Postgres profile report (StartID: 333, EndID: 356)

pg_profile version 0.3.6

Server name: local

Report interval: 2026-07-13 04:00:02+01 - 2026-07-14 03:00:01+01

Warning!Report includes 23 sample(s) with setting pg_stat_statements.track = all.Value of %Total columns may be incorrect.

Report sections

Server statistics

Database statistics

DatabaseTransactionsBlock statisticsTuplesTemp filesSizeGrowth
CommitsRollbacksDeadlocksHit(%)ReadHitRetFetInsUpdDelSizeFiles
openbravo1225725652592.9676815382610143768855366419078539228295649103410265410678219511 GB178289 GB446 MB
postgres1176499.1159506591351910369351404206391 kB
Total1237489652592.9676815977610144427990366438182229228647053103410265412678219511 GB178289 GB446 MB

Statement statistics by database

DatabaseCallsTime (s)Fetched (blk)Dirtied (blk)Temp (blk)Local (blk)Statements
ExecReadWriteTrgSharedLocalSharedLocalReadWriteReadWrite
openbravo2242496034384.15534.201131165606027703856248683623366922281425686258351985
postgres56528.7489889367
template163488.487176276
Total2243696034401.37534.201131175312527703856248683623366922281425686258352628

Cluster statistics

MetricValue
Scheduled checkpoints275
Requested checkpoints2
Checkpoint write time (s)45831.62
Checkpoint sync time (s)23.59
Checkpoints buffers written1123876
Background buffers written555007
Backend buffers written170921
Backend fsync count
Bgwriter interrupts (too many buffers)3372
Number of buffers allocated188314928
WAL generated11 GB
WAL segments archived720
WAL segments archive failed

Tablespace statistics

TablespacePathSizeGrowth
pg_default289 GB446 MB
pg_global1006 kB

SQL query statistics

Top SQL by execution time

Query IDDatabaseExec (s)%TotalRowsExecution times (ms)Executions
MeanMinMaxStdErr

4aae53f3da

[5b93a467]

openbravo3098.129.0122450.14016415.215204650.92719750.797138

9918228dba

[9603f2b6]

openbravo2884.818.39115354611.707552.8661235.66552.2154716

60ced86ccb

[e11c57bb]

openbravo1319.523.8443984.01741463.97481012.7716898.60630

6aeca8addc

[e0869ab2]

openbravo1211.133.528776.3227574.27229604.3512336.089138

6e47e0b2e7

[c4153bc0]

openbravo1160.483.3729857353188.130208.09241273.4263509.667364

b76ef6c915

[84cd185c]

openbravo1154.443.3666424562.4646531.495124599.55624285.19647

4a3e0e1397

[4f62fc29]

openbravo1080.793.141045033.05442888.18371603.1635571.30624

59ed037ff5

[f51c7e38]

openbravo1026.132.98258051306.28613814.854103976.87027624.83920

7006b96539

[9eb34024]

openbravo1022.822.972580396.44125.1864436.548603.0722580

185ba8cb63

[6e2f4e1a]

openbravo769.012.2413247253.6030.023891.88411.418213451

416d959161

[fb2a3095]

openbravo549.371.604818.9994221.09015980.1421354.911114

c17924c407

[bae859d8]

openbravo434.891.2615942619.83121.93746666.3836658.488166

4a2522fbe3

[682894be]

openbravo388.731.13450388729.861388729.861388729.8611

e4b8f19235

[464f8019]

openbravo375.791.09399635.5155772.49286033.73614351.82439

ec8c626e99

[cd9c0fd2]

openbravo360.641.056047360644.027360644.027360644.0271

67a75a3409

[7318d810]

openbravo346.231.0137957921346229.259346229.259346229.2591

c180ac6f1a

[2266d068]

openbravo341.080.9913211823.94522.08184136.2016939.260187

03d9123317

[94eb716f]

openbravo311.970.91378431.5755498.92636565.9346694.28837

ff35139986

[a35d3b99]

openbravo292.990.851755166.94316.2359452.546648.0911755

7efafc5af2

[74267a2]

openbravo292.920.851755166.90416.2159452.521648.0891755

Top SQL by executions

Query IDDatabaseExecutions%TotalRowsMean(ms)Min(ms)Max(ms)StdErr(ms)Elapsed(s)

b280347c9b

[fc9c6197]

openbravo373290716.6437329070.0100.00818.0240.01439.1

9a0540688d

[263f5b0b]

openbravo17991818.029388470.0030.0011.3370.0044.5

10410964a2

[6df21622]

openbravo7698523.437698520.0030.0028.0460.0172.4

a46753d96b

[d2788d4]

openbravo6915363.086915360.0030.0014.1060.0112.1

1b89da5cec

[6f9b1a85]

openbravo3616811.610.0010.0004.8820.0080.3

8a7672d920

[2049516b]

openbravo3541251.580.0010.0001.0850.0030.2

03a1d4e90c

[1c1c8a81]

openbravo2452041.092452040.0030.0025.1250.0190.8

7247cdc8b5

[aada7118]

openbravo2391001.07138560.0190.00317.9180.1274.6

784dd58a53

[c7e884e0]

openbravo2298771.022298770.0040.0023.4870.0190.9

08c88cedcc

[6d0d7fc]

openbravo2286201.022286200.0050.0024.9890.0191.2

f2e5c3fd88

[2b8e321f]

openbravo2253181.002253180.0060.0038.6980.0241.4

1fbcf388f5

[588b10e0]

openbravo2176500.970.0020.0013.6130.0130.5

185ba8cb63

[6e2f4e1a]

openbravo2134510.9513247253.6030.023891.88411.418769.0

2bbd1014ed

[d9433e44]

openbravo2014770.902014770.0030.0021.1910.0070.6

a3e442bb19

[c7ef7dee]

openbravo1851290.831851290.0130.0113.8690.0102.4

281ee3922a

[5d6197e1]

openbravo1492290.671492290.0070.0042.5640.0161.0

10f4e6f2bf

[413ce6da]

openbravo1469470.651469470.0210.00626.6350.0763.0

b93f3a3e02

[30f21dca]

openbravo1444720.641444720.2530.20421.8480.08136.6

ab6445a3b6

[a5716dbe]

openbravo1444720.641444720.2300.20514.3720.06433.2

b9a73dbea9

[2b7ebfcc]

openbravo1221930.541221930.0100.00717.3030.0511.2

Top SQL by shared blocks fetched

Query IDDatabaseblks fetched%TotalHits(%)Elapsed(s)RowsExecutions

4aae53f3da

[5b93a467]

openbravo148316614813.1194.803098.1138

185ba8cb63

[6e2f4e1a]

openbravo8576192047.5899.90769.01324725213451

6aeca8addc

[e0869ab2]

openbravo6599727575.8398.041211.1138

6e47e0b2e7

[c4153bc0]

openbravo3483011603.0894.241160.52985735364

d5074afa0f

[3a0c623c]

openbravo2523867372.2399.77152.2478478

c17924c407

[bae859d8]

openbravo2497969452.2198.12434.91594166

e4b8f19235

[464f8019]

openbravo2387792242.1198.54375.83939

c180ac6f1a

[2266d068]

openbravo2269999502.0199.57341.11321187

03d9123317

[94eb716f]

openbravo2265207542.0097.52312.03737

3aafe57489

[cb8efa32]

openbravo2081336251.8499.20209.63534

59ed037ff5

[f51c7e38]

openbravo2073074781.8399.031026.1258020

7006b96539

[9eb34024]

openbravo2067961511.8399.031022.825802580

60ced86ccb

[e11c57bb]

openbravo2020683611.7999.931319.530

5e90170047

[f913c48b]

openbravo1601769371.4214.77255.74040

4d2174a22e

[eaa91e53]

openbravo1601769301.4214.81275.24040

2ea6727409

[5cfb16aa]

openbravo1549490771.3799.94158.92323

4a3e0e1397

[4f62fc29]

openbravo1469315871.3099.981080.81024

b76ef6c915

[84cd185c]

openbravo1383489651.2299.001154.466447

bde1a48003

[7d7d1050]

openbravo1171673531.04100.00118.4171171

beb5c816db

[73183df]

openbravo1133310161.0098.69173.666

Top SQL by shared blocks read

Query IDDatabaseReads%TotalHits(%)Elapsed(s)RowsExecutions

5e90170047

[f913c48b]

openbravo13651510817.3114.77255.74040

4d2174a22e

[eaa91e53]

openbravo13646262017.3014.81275.24040

4aae53f3da

[5b93a467]

openbravo771803429.7994.803098.1138

266bf611a1

[5aa6d77]

openbravo728237509.239.07151.92020

ac12b19890

[5904b677]

openbravo725663079.209.39147.92020

416d959161

[fb2a3095]

openbravo446563125.6660.36549.4114

6e47e0b2e7

[c4153bc0]

openbravo200473072.5494.241160.52985735364

b4d6b6665e

[72db11e8]

openbravo195520202.4882.30179.8138

6aeca8addc

[e0869ab2]

openbravo129434881.6498.041211.1138

2e9bd5a429

[ed993cc]

openbravo127676211.623.4648.41212

4548d95ea5

[2b2cfb9e]

openbravo127517051.623.5824.31212

03d9123317

[94eb716f]

openbravo56259880.7197.52312.03737

c17924c407

[bae859d8]

openbravo46918320.5998.12434.91594166

5ae9609e2e

[5a389c96]

openbravo43053420.552.3312.444

44ba191660

[6339ff8e]

openbravo42988310.552.4813.144

67a75a3409

[7318d810]

openbravo40037630.51346.2379579211

718ca1759a

[4e537c8f]

openbravo37224700.471.7313.344

1ff954bca3

[7f173ebd]

openbravo37184610.471.837.544

22615c404b

[c1020a32]

openbravo35636930.4574.76125.041

e4b8f19235

[464f8019]

openbravo34851940.4498.54375.83939

Top SQL by shared blocks dirtied

Query IDDatabaseDirtied%TotalHits(%)Elapsed(s)RowsExecutions

d545a87b3d

[a03a69a5]

openbravo1933127.7797.8031.65768857688

6758866a26

[eb67e33f]

openbravo1105914.4594.1726.17474174741

8d75ee1767

[3695269c]

openbravo1039444.1895.9423.12498424984

7efafc5af2

[74267a2]

openbravo868933.4986.16292.917551755

ff35139986

[a35d3b99]

openbravo868933.4986.16293.017551755

4cb9cc1cbf

[ea4e56b9]

openbravo868933.4986.16292.917551755

101ed24576

[205b8c88]

openbravo402911.6298.517.11387013870

fec93ea334

[2ff59f28]

openbravo373641.5099.457.46152361523

43a80059e4

[bfd8039a]

openbravo350321.4199.2153.212061206

22615c404b

[c1020a32]

openbravo345031.3974.76125.041

2c52c242a6

[4282957f]

openbravo313941.2695.9314.32637026370

e1739d379d

[6f92ba97]

openbravo312731.267.9086.870098301

26959f7c7a

[d3eb78]

openbravo308671.2489.989.71505815058

320ed06a6d

[41b729f2]

openbravo295941.1995.685.369596959

fe49fa204f

[3ef02a9d]

openbravo283811.1497.265.91353213532

86ae00e408

[12018251]

openbravo267011.0785.456.273487348

7cdb887c2a

[8f1d721]

openbravo264071.0699.3918.760186018

fa5e805d20

[6bdd6481]

openbravo248531.0098.167.560186018

1b416379ea

[97b6b91a]

openbravo224100.9094.624.466226622

75890e23a4

[baa0f6d7]

openbravo215830.8799.3512.766076607

Top SQL by shared blocks written

Query IDDatabaseWritten%Total%BackendWHits(%)Elapsed(s)RowsExecutions

2c756b6487

[4211bbca]

openbravo118800.646.9538.865.41

a679263d40

[1dc4b9ad]

openbravo118450.646.9351.294.244

6e47e0b2e7

[c4153bc0]

openbravo102180.555.9894.241160.52985735364

98d4183d4b

[6ee18a4d]

openbravo83280.454.8752.660.51

e4b8f19235

[464f8019]

openbravo64630.353.7898.54375.83939

4aae53f3da

[5b93a467]

openbravo63950.353.7494.803098.1138

b4d6b6665e

[72db11e8]

openbravo63900.353.7482.30179.8138

6aeca8addc

[e0869ab2]

openbravo54790.303.2198.041211.1138

2ce9536368

[76ede534]

openbravo33250.181.9551.150.11

09f3a2812f

[2e890cfd]

openbravo31960.171.8797.90225.399

79a215aba6

[4c2990b7]

openbravo25390.141.4927.5511.144

964d1d9b09

[ecb18403]

openbravo24630.131.4430.5426.655

d8e19e1efc

[52e3e22a]

openbravo16690.090.9894.2211.411

6856866d41

[d9c82a48]

openbravo12810.070.7598.3465.677

3aafe57489

[cb8efa32]

openbravo12270.070.7299.20209.63534

c17924c407

[bae859d8]

openbravo12120.070.7198.12434.91594166

0a92390e0d

[317531b3]

openbravo11250.060.6693.4255.85

5c9cd00b05

[aba3845d]

openbravo7250.040.4291.4714.211

82c30be2ca

[b8ecf334]

openbravo6860.040.406.9013.422

27798bc733

[13e66b4d]

openbravo6680.040.3929.0812.211

Top SQL by temp usage

Query IDDatabaseLocal fetchedHits(%)Local (blk)Temp (blk)Elapsed(s)RowsExecutions
Write%TotalRead%TotalWrite%TotalRead%Total

8ec2df7b9d

[6e556c27]

openbravo75998053.3131191645.06223.3176868

b76ef6c915

[84cd185c]

openbravo18406212.9118409226.591154.466447

7b258c2827

[517336d2]

openbravo894086.27366965.3026.12088

7e62f3b264

[6e3dad39]

openbravo670564.70275223.9819.31566

5d1db5f289

[1ec3a789]

openbravo558183.92275223.985.71566

a065237476

[4f137456]

openbravo447073.14183482.6513.41044

f66a111527

[46df0a8e]

openbravo565063.9645360.663.611

7871717022

[fbc81439]

openbravo234871.65234853.392.166

d3471812de

[aa92e059]

openbravo221811.56137761.9923.833

ac7478aac8

[58a0d3d2]

openbravo233581.6491761.330.322

fc174636bc

[2876fb0a]

openbravo231351.62180.001.667

4dea79c24d

[d87869f1]

openbravo142831.0068860.9943.522

51552ef4b0

[b96264b6]

openbravo154281.08120.001.045

18f1d739d8

[e05c613]

openbravo77120.5445920.660.411

1df7427be7

[69eb8289]

openbravo77120.5445920.660.4501

5c9cd00b05

[aba3845d]

openbravo74220.5245920.6614.211

df8f3b3bec

[2bf5405c]

openbravo77120.5437220.541.011

a332052f8c

[e0b70c2d]

openbravo74020.5236260.526.511

7b31b157d2

[b394259d]

openbravo48220.3448220.700.411

00c98130c9

[4d5eeb65]

openbravo34950.2522970.331.312

Complete list of SQL texts

QueryIDQuery Text
26959f7c7ainsert into M_Transaction_Cost (AD_Client_ID, AD_Org_ID, Created, Createdby, Updated, Updatedby, Isactive, M_Transaction_ID, Cost, CostDate, C_Currency_ID, IsUnitCost, DateAcct, M_Transaction_Cost_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)
266bf611a1SELECT COUNT(*) AS ID FROM Fact_Acct WHERE C_Tax_ID = $1 AND AD_ORG_ID NOT IN ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39)
08c88cedccSELECT $2 FROM ONLY "public"."c_bpartner" x WHERE "c_bpartner_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
beb5c816dbselect array_to_string(array_agg(fin_paymen0_.FIN_Payment_Scheduledetail_ID), $12) as col_0_0_, array_to_string(array_agg(order3_.DocumentNo), $13) as col_1_0_, case when invoice7_.IsSOTrx=$14 and (organizati11_.AD_Org_ID is not null) and (organizati11_.EM_Aprm_Payment_Desc like $15) then invoice7_.POReference else invoice7_.DocumentNo end as col_2_0_, coalesce(fin_paymen6_.Fin_Paymentmethod_ID, fin_paymen2_.Fin_Paymentmethod_ID) as col_3_0_, coalesce(fin_paymen9_.Name, fin_paymen5_.Name) as col_4_0_, coalesce(fin_paymen6_.ExpectedDate, fin_paymen2_.ExpectedDate) as col_5_0_, max(coalesce(fin_paymen6_.Amount, fin_paymen2_.Amount)) as col_6_0_, max(coalesce(invoice7_.GrandTotal, $16)) as col_7_0_, businesspa1_.C_BPartner_ID as col_8_0_, businesspa1_.Name as col_9_0_, sum(fin_paymen0_.Amount+fin_paymen0_.Writeoffamt) as col_10_0_, coalesce(sum(fin_paymen12_.Amount), $17) as col_11_0_, case when sum(fin_paymen0_.Writeoffamt)<>$18 then $19 else $20 end as col_12_0_, case when max(fin_paymen13_.Fin_Payment_ID) is not null then $21 else $22 end as col_13_0_ from FIN_Payment_ScheduleDetail fin_paymen0_ inner join C_BPartner businesspa1_ on fin_paymen0_.C_Bpartner_ID=businesspa1_.C_BPartner_ID left outer join FIN_Payment_Schedule fin_paymen2_ on fin_paymen0_.FIN_Payment_Schedule_Order=fin_paymen2_.Fin_Payment_Schedule_ID left outer join C_Order order3_ on fin_paymen2_.C_Order_ID=order3_.C_Order_ID and (order3_.IsSOTrx=$1 and order3_.C_Currency_ID=$2) left outer join FIN_Payment_Priority fin_paymen4_ on fin_paymen2_.FIN_Payment_Priority_ID=fin_paymen4_.FIN_Payment_Priority_ID left outer join FIN_PaymentMethod fin_paymen5_ on fin_paymen2_.Fin_Paymentmethod_ID=fin_paymen5_.Fin_Paymentmethod_ID left outer join FIN_Payment_Schedule fin_paymen6_ on fin_paymen0_.FIN_Payment_Schedule_Invoice=fin_paymen6_.Fin_Payment_Schedule_ID left outer join C_Invoice invoice7_ on fin_paymen6_.C_Invoice_ID=invoice7_.C_Invoice_ID and (invoice7_.IsSOTrx=$3 and invoice7_.C_Currency_ID=$4) left outer join FIN_Payment_Priority fin_paymen8_ on fin_paymen6_.FIN_Payment_Priority_ID=fin_paymen8_.FIN_Payment_Priority_ID left outer join FIN_PaymentMethod fin_paymen9_ on fin_paymen6_.Fin_Paymentmethod_ID=fin_paymen9_.Fin_Paymentmethod_ID left outer join AD_Org organizati10_ on fin_paymen0_.AD_Org_ID=organizati10_.AD_Org_ID left outer join AD_OrgInfo organizati11_ on organizati10_.AD_Org_ID=organizati11_.AD_Org_ID left outer join FIN_Payment_Detail fin_paymen12_ on fin_paymen0_.FIN_Payment_Detail_ID=fin_paymen12_.Fin_Payment_Detail_ID left outer join FIN_Payment fin_paymen13_ on fin_paymen12_.Fin_Payment_ID=fin_paymen13_.Fin_Payment_ID where (fin_paymen0_.AD_Client_ID in ($23 , $5)) and (fin_paymen0_.FIN_Payment_Detail_ID is null or fin_paymen13_.Fin_Payment_ID=$6) and (coalesce(fin_paymen6_.Fin_Payment_Schedule_ID, fin_paymen2_.Fin_Payment_Schedule_ID) is not null) and (fin_paymen0_.AD_Org_ID in ($7)) and (organizati11_.AD_Org_ID is null or organizati11_.IsActive=$24) and invoice7_.IsSOTrx=$8 and invoice7_.C_Currency_ID=$9 group by invoice7_.C_Invoice_ID , invoice7_.DocumentNo , invoice7_.C_DocType_ID , coalesce(fin_paymen6_.Fin_Paymentmethod_ID, fin_paymen2_.Fin_Paymentmethod_ID) , coalesce(fin_paymen9_.Name, fin_paymen5_.Name) , coalesce(fin_paymen6_.ExpectedDate, fin_paymen2_.ExpectedDate) , coalesce(fin_paymen8_.Priority, fin_paymen4_.Priority) , invoice7_.IsSOTrx , organizati11_.AD_Org_ID , organizati11_.EM_Aprm_Payment_Desc , invoice7_.POReference , businesspa1_.C_BPartner_ID , businesspa1_.Name having upper(coalesce(fin_paymen9_.Name, fin_paymen5_.Name)) like upper($10) escape $25 order by case when max(fin_paymen13_.Fin_Payment_ID) is not null then $26 else $27 end, coalesce(fin_paymen8_.Priority, fin_paymen4_.Priority), coalesce(fin_paymen6_.ExpectedDate, fin_paymen2_.ExpectedDate), invoice7_.DocumentNo limit $11
7efafc5af2SELECT C_ORDER_POST1(p_PInstance_ID, $2)
7cdb887c2ainsert into M_ProductionLine (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, M_ProductionPlan_ID, Line, M_Product_ID, MovementQty, M_Locator_ID, M_AttributeSetInstance_ID, C_UOM_ID, Calculated, Rejectedquantity, EM_Cactl_Added_Manually, M_ProductionLine_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18)
a46753d96bSELECT $2 FROM ONLY "public"."ad_client" x WHERE "ad_client_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
18f1d739d8select fin_finacc0_.Fin_Finacc_Transaction_ID as Fin_Fina1_388_, fin_finacc0_.AD_Client_ID as AD_Clien2_388_, fin_finacc0_.AD_Org_ID as AD_Org_I3_388_, fin_finacc0_.Created as Created4_388_, fin_finacc0_.Createdby as Createdb5_388_, fin_finacc0_.Updated as Updated6_388_, fin_finacc0_.Updatedby as Updatedb7_388_, fin_finacc0_.Isactive as Isactive8_388_, fin_finacc0_.C_Currency_ID as C_Curren9_388_, fin_finacc0_.Fin_Financial_Account_ID as Fin_Fin10_388_, fin_finacc0_.Line as Line11_388_, fin_finacc0_.Fin_Payment_ID as Fin_Pay12_388_, fin_finacc0_.DateAcct as DateAcc13_388_, fin_finacc0_.C_Glitem_ID as C_Glite14_388_, fin_finacc0_.Status as Status15_388_, fin_finacc0_.Paymentamt as Payment16_388_, fin_finacc0_.Depositamt as Deposit17_388_, fin_finacc0_.Processed as Process18_388_, fin_finacc0_.Processing as Process19_388_, fin_finacc0_.Posted as Posted20_388_, fin_finacc0_.C_Project_ID as C_Proje21_388_, fin_finacc0_.C_Campaign_ID as C_Campa22_388_, fin_finacc0_.C_Activity_ID as C_Activ23_388_, fin_finacc0_.User1_ID as User24_388_, fin_finacc0_.User2_ID as User25_388_, fin_finacc0_.Trxtype as Trxtype26_388_, fin_finacc0_.Statementdate as Stateme27_388_, fin_finacc0_.Description as Descrip28_388_, fin_finacc0_.FIN_Reconciliation_ID as FIN_Rec29_388_, fin_finacc0_.CreatedByAlgorithm as Created30_388_, fin_finacc0_.Foreign_Currency_ID as Foreign31_388_, fin_finacc0_.Foreign_Convert_Rate as Foreign32_388_, fin_finacc0_.Foreign_Amount as Foreign33_388_, fin_finacc0_.C_Bpartner_ID as C_Bpart34_388_, fin_finacc0_.M_Product_ID as M_Produ35_388_, fin_finacc0_.C_Salesregion_ID as C_Sales36_388_, fin_finacc0_.C_Costcenter_ID as C_Costc37_388_, fin_finacc0_.EM_Aprm_Processed as EM_Aprm38_388_, fin_finacc0_.EM_Obpos_App_Cashup_ID as EM_Obpo39_388_, fin_finacc0_.EM_Aprm_Finacc_Trans_Origin as EM_Aprm40_388_ from FIN_Finacc_Transaction fin_finacc0_ where fin_finacc0_.Fin_Financial_Account_ID=$1 and (fin_finacc0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (fin_finacc0_.AD_Client_ID in ($40 , $41)) order by fin_finacc0_.Statementdate desc, fin_finacc0_.Fin_Finacc_Transaction_ID desc limit $42
2e9bd5a429SELECT COUNT(*) AS ID FROM C_OrderLine WHERE C_Tax_ID = $1 AND EXISTS (SELECT $2 FROM C_Order WHERE C_Order.C_Order_ID = C_OrderLine.C_Order_ID AND C_Order.IsSOTrx=$3) AND AD_ORG_ID NOT IN ($4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41)
86ae00e408insert into C_OrderLineTax (C_Orderline_ID, C_Tax_ID, AD_Client_ID, AD_Org_ID, Isactive, Created, Createdby, Updated, Updatedby, Taxbaseamt, Taxamt, Line, C_Order_ID, C_Orderlinetax_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)
27798bc733SELECT COUNT(*) AS ID FROM APRM_Finacc_Trx_Full_Acct_V WHERE C_Tax_ID = $1 AND EXISTS (SELECT $2 FROM FIN_Financial_Account WHERE FIN_Financial_Account.FIN_Financial_Account_ID = APRM_Finacc_Trx_Full_Acct_V.FIN_Financial_Account_ID) AND AD_ORG_ID NOT IN ($3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40)
03a1d4e90cSELECT $2 FROM ONLY "public"."c_currency" x WHERE "c_currency_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
a679263d40SELECT COUNT(*) AS ID FROM M_ProductionPlan WHERE M_Product_ID = $1 AND EXISTS (SELECT $2 FROM M_Production WHERE M_Production.M_Production_ID = M_ProductionPlan.M_Production_ID AND M_Production.Issotrx=$3) AND AD_ORG_ID NOT IN ($4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41)
5d1db5f289select cactl_vari0_.Cactl_Variety_Product_ID as Cactl_Va1_366_, cactl_vari0_.AD_Client_ID as AD_Clien2_366_, cactl_vari0_.AD_Org_ID as AD_Org_I3_366_, cactl_vari0_.Isactive as Isactive4_366_, cactl_vari0_.Created as Created5_366_, cactl_vari0_.Createdby as Createdb6_366_, cactl_vari0_.Updated as Updated7_366_, cactl_vari0_.Updatedby as Updatedb8_366_, cactl_vari0_.M_Product_ID as M_Produc9_366_, cactl_vari0_.C_Bpartner_ID as C_Bpart10_366_, cactl_vari0_.C_Uom_ID as C_Uom_I11_366_, cactl_vari0_.Price as Price12_366_, cactl_vari0_.Cactl_Variety_ID as Cactl_V13_366_, cactl_vari0_.Pricelist as Priceli14_366_, cactl_vari0_.Date_From as Date_Fr15_366_, cactl_vari0_.Date_To as Date_To16_366_, cactl_vari0_.Vendorproductno as Vendorp17_366_, cactl_vari0_.Iscurrentvendor as Iscurre18_366_, cactl_vari0_.Isprocessing as Isproce19_366_ from cactl_variety_product cactl_vari0_ left outer join C_UOM uom1_ on cactl_vari0_.C_Uom_ID=uom1_.C_UOM_ID where (cactl_vari0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41)) and (cactl_vari0_.AD_Client_ID in ($1 , $2)) and cactl_vari0_.Isactive=$42 order by uom1_.Name, cactl_vari0_.Cactl_Variety_Product_ID limit $3
8a7672d920COMMIT
101ed24576update C_Invoice set Updated=$1, DaysTillDue=$2, LastCalculatedOnDate=$3 where C_Invoice_ID=$4
c180ac6f1aselect businesspa0_.C_BPartner_ID as C_BPartn1_203_, businesspa0_.AD_Client_ID as AD_Clien2_203_, businesspa0_.AD_Org_ID as AD_Org_I3_203_, businesspa0_.IsActive as IsActive4_203_, businesspa0_.Created as Created5_203_, businesspa0_.CreatedBy as CreatedB6_203_, businesspa0_.Updated as Updated7_203_, businesspa0_.UpdatedBy as UpdatedB8_203_, businesspa0_.Value as Value9_203_, businesspa0_.Name as Name10_203_, businesspa0_.Name2 as Name11_203_, businesspa0_.Description as Descrip12_203_, businesspa0_.IsSummary as IsSumma13_203_, businesspa0_.C_BP_Group_ID as C_BP_Gr14_203_, businesspa0_.IsOneTime as IsOneTi15_203_, businesspa0_.IsProspect as IsProsp16_203_, businesspa0_.IsVendor as IsVendo17_203_, businesspa0_.IsCustomer as IsCusto18_203_, businesspa0_.IsEmployee as IsEmplo19_203_, businesspa0_.IsSalesRep as IsSales20_203_, businesspa0_.ReferenceNo as Referen21_203_, businesspa0_.DUNS as DUNS22_203_, businesspa0_.URL as URL23_203_, businesspa0_.AD_Language as AD_Lang24_203_, businesspa0_.TaxID as TaxID25_203_, businesspa0_.IsTaxExempt as IsTaxEx26_203_, businesspa0_.C_InvoiceSchedule_ID as C_Invoi27_203_, businesspa0_.Rating as Rating28_203_, businesspa0_.SalesVolume as SalesVo29_203_, businesspa0_.NumberEmployees as NumberE30_203_, businesspa0_.NAICS as NAICS31_203_, businesspa0_.FirstSale as FirstSa32_203_, businesspa0_.AcqusitionCost as Acqusit33_203_, businesspa0_.PotentialLifeTimeValue as Potenti34_203_, businesspa0_.ActualLifeTimeValue as ActualL35_203_, businesspa0_.ShareOfCustomer as ShareOf36_203_, businesspa0_.PaymentRule as Payment37_203_, businesspa0_.SO_CreditLimit as SO_Cred38_203_, businesspa0_.SO_CreditUsed as SO_Cred39_203_, businesspa0_.C_PaymentTerm_ID as C_Payme40_203_, businesspa0_.M_PriceList_ID as M_Price41_203_, businesspa0_.IsDiscountPrinted as IsDisco42_203_, businesspa0_.SO_Description as SO_Desc43_203_, businesspa0_.POReference as PORefer44_203_, businesspa0_.PaymentRulePO as Payment45_203_, businesspa0_.PO_PriceList_ID as PO_Pric46_203_, businesspa0_.PO_PaymentTerm_ID as PO_Paym47_203_, businesspa0_.DocumentCopies as Documen48_203_, businesspa0_.C_Greeting_ID as C_Greet49_203_, businesspa0_.InvoiceRule as Invoice50_203_, businesspa0_.DeliveryRule as Deliver51_203_, businesspa0_.DeliveryViaRule as Deliver52_203_, businesspa0_.SalesRep_ID as SalesRe53_203_, businesspa0_.BPartner_Parent_ID as BPartne54_203_, businesspa0_.SOCreditStatus as SOCredi55_203_, businesspa0_.AD_Forced_Org_ID as AD_Forc56_203_, businesspa0_.ShowPriceInOrder as ShowPri57_203_, businesspa0_.Invoicegrouping as Invoice58_203_, businesspa0_.FixMonthDay as FixMont59_203_, businesspa0_.FixMonthDay2 as FixMont60_203_, businesspa0_.Fixmonthday3 as Fixmont61_203_, businesspa0_.Isworker as Isworke62_203_, businesspa0_.UPC as UPC63_203_, businesspa0_.C_Salary_Category_ID as C_Salar64_203_, businesspa0_.Invoice_Printformat as Invoice65_203_, businesspa0_.Last_Days as Last_Da66_203_, businesspa0_.PO_Bankaccount_ID as PO_Bank67_203_, businesspa0_.PO_BP_TaxCategory_ID as PO_BP_T68_203_, businesspa0_.PO_Fixmonthday as PO_Fixm69_203_, businesspa0_.PO_Fixmonthday2 as PO_Fixm70_203_, businesspa0_.PO_Fixmonthday3 as PO_Fixm71_203_, businesspa0_.SO_Bankaccount_ID as SO_Bank72_203_, businesspa0_.SO_Bp_Taxcategory_ID as SO_Bp_T73_203_, businesspa0_.Fiscalcode as Fiscalc74_203_, businesspa0_.Isofiscalcode as Isofisc75_203_, businesspa0_.EM_Einv_Einvoice as EM_Einv76_203_, businesspa0_.PO_C_Incoterms_ID as PO_C_In77_203_, businesspa0_.EM_Einv_Format_Id as EM_Einv78_203_, businesspa0_.SO_C_Incoterms_ID as SO_C_In79_203_, businesspa0_.EM_Einv_Platform_Id as EM_Einv80_203_, businesspa0_.FIN_Paymentmethod_ID as FIN_Pay81_203_, businesspa0_.EM_Einv_Email as EM_Einv82_203_, businesspa0_.PO_Paymentmethod_ID as PO_Paym83_203_, businesspa0_.FIN_Financial_Account_ID as FIN_Fin84_203_, businesspa0_.EM_Einv_Deliverymode as EM_Einv85_203_, businesspa0_.PO_Financial_Account_ID as PO_Fina86_203_, businesspa0_.Customer_Blocking as Custome87_203_, businesspa0_.Vendor_Blocking as Vendor_88_203_, businesspa0_.SO_Payment_Blocking as SO_Paym89_203_, businesspa0_.PO_Payment_Blocking as PO_Paym90_203_, businesspa0_.SO_Invoice_Blocking as SO_Invo91_203_, businesspa0_.PO_Invoice_Blocking as PO_Invo92_203_, businesspa0_.SO_Order_Blocking as SO_Orde93_203_, businesspa0_.PO_Order_Blocking as PO_Orde94_203_, businesspa0_.SO_Goods_Blocking as SO_Good95_203_, businesspa0_.PO_Goods_Blocking as PO_Good96_203_, businesspa0_.Iscashvat as Iscashv97_203_, businesspa0_.EM_Advcrm_Newactivity as EM_Advc98_203_, businesspa0_.Update_Currency as Update_99_203_, businesspa0_.BP_Currency_ID as BP_Cur100_203_, businesspa0_.Birthplace as Birthp101_203_, businesspa0_.Birthday as Birthd102_203_, businesspa0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_203_, businesspa0_.Is_Customer_Consent as Is_Cus104_203_, businesspa0_.EM_OBSMAIL_INVOICEVIAEMAIL as EM_OBS105_203_, businesspa0_.EM_Obsepad_Mandate_Identifier as EM_Obs106_203_, businesspa0_.EM_Obsmail_Language as EM_Obs107_203_, businesspa0_.EM_Obsepad_Mandate_Date as EM_Obs108_203_, businesspa0_.EM_Aeatsii_Rep_Taxid as EM_Aea109_203_, businesspa0_.EM_Aeatsii_Menor as EM_Aea110_203_, businesspa0_.EM_Pricm_Isintercompany as EM_Pri111_203_, businesspa0_.EM_Psat_Billtobpartner_ID as EM_Psa112_203_, businesspa0_.EM_Psat_Locator_ID as EM_Psa113_203_, businesspa0_.EM_Psat_Mobile_Request as EM_Psa114_203_, businesspa0_.EM_Prges_Glitem_ID as EM_Prg115_203_, businesspa0_.EM_Rrhh_Exemployee as EM_Rrh116_203_, businesspa0_.EM_Rrhh_Candidate as EM_Rrh117_203_, businesspa0_.EM_Prpass_No_Print_Pass as EM_Prp118_203_, businesspa0_.EM_Rrhh_Holidays_Supervisor as EM_Rrh119_203_, businesspa0_.EM_Cactal_Emp_No as EM_Cac120_203_, businesspa0_.EM_Cactal_Emp_Relationship_No as EM_Cac121_203_, businesspa0_.EM_Obwpl_Bp_Block_Pickinglist as EM_Obw122_203_, businesspa0_.EM_Pruti_Addbp as EM_Pru123_203_, businesspa0_.EM_Prpass_Generatepassemployee as EM_Prp124_203_, businesspa0_.EM_Rrhh_Mainworkstation_ID as EM_Rrh125_203_, businesspa0_.EM_Rrhh_Bp_Transfer_Code as EM_Rrh126_203_, businesspa0_.EM_OBTIK_Tax_ID_Key as EM_OBT127_203_ from C_BPartner businesspa0_ where (upper((businesspa0_.Value||$3||businesspa0_.Name||$4||coalesce(to_char(businesspa0_.TaxID), $5)||$6||coalesce(to_char(businesspa0_.Name2), $7))) like upper($1) escape $8) and (exists (select $9 from C_Order order1_ inner join C_BPartner businesspa2_ on order1_.C_BPartner_ID=businesspa2_.C_BPartner_ID cross join C_DocType documentty3_ where order1_.C_DocTypeTarget_ID=documentty3_.C_DocType_ID and order1_.IsSOTrx=$10 and documentty3_.IsReturn=$11 and businesspa2_.C_BPartner_ID=businesspa0_.C_BPartner_ID and (order1_.AD_Org_ID in ($12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41 , $42 , $43 , $44 , $45 , $46 , $47 , $48 , $49)) and (order1_.AD_Client_ID in ($50 , $51)))) order by businesspa0_.Value, businesspa0_.Name, businesspa0_.TaxID, businesspa0_.Name2 limit $2
9a0540688dSELECT LEVELNO FROM AD_ORG_TREE WHERE AD_ORG_ID = p_orgid AND AD_PARENT_ORG_ID = p_parentorgid AND AD_CLIENT_ID = p_clientid
fc174636bcselect fin_finacc0_.Fin_Finacc_Transaction_ID as Fin_Fina1_388_, fin_finacc0_.AD_Client_ID as AD_Clien2_388_, fin_finacc0_.AD_Org_ID as AD_Org_I3_388_, fin_finacc0_.Created as Created4_388_, fin_finacc0_.Createdby as Createdb5_388_, fin_finacc0_.Updated as Updated6_388_, fin_finacc0_.Updatedby as Updatedb7_388_, fin_finacc0_.Isactive as Isactive8_388_, fin_finacc0_.C_Currency_ID as C_Curren9_388_, fin_finacc0_.Fin_Financial_Account_ID as Fin_Fin10_388_, fin_finacc0_.Line as Line11_388_, fin_finacc0_.Fin_Payment_ID as Fin_Pay12_388_, fin_finacc0_.DateAcct as DateAcc13_388_, fin_finacc0_.C_Glitem_ID as C_Glite14_388_, fin_finacc0_.Status as Status15_388_, fin_finacc0_.Paymentamt as Payment16_388_, fin_finacc0_.Depositamt as Deposit17_388_, fin_finacc0_.Processed as Process18_388_, fin_finacc0_.Processing as Process19_388_, fin_finacc0_.Posted as Posted20_388_, fin_finacc0_.C_Project_ID as C_Proje21_388_, fin_finacc0_.C_Campaign_ID as C_Campa22_388_, fin_finacc0_.C_Activity_ID as C_Activ23_388_, fin_finacc0_.User1_ID as User24_388_, fin_finacc0_.User2_ID as User25_388_, fin_finacc0_.Trxtype as Trxtype26_388_, fin_finacc0_.Statementdate as Stateme27_388_, fin_finacc0_.Description as Descrip28_388_, fin_finacc0_.FIN_Reconciliation_ID as FIN_Rec29_388_, fin_finacc0_.CreatedByAlgorithm as Created30_388_, fin_finacc0_.Foreign_Currency_ID as Foreign31_388_, fin_finacc0_.Foreign_Convert_Rate as Foreign32_388_, fin_finacc0_.Foreign_Amount as Foreign33_388_, fin_finacc0_.C_Bpartner_ID as C_Bpart34_388_, fin_finacc0_.M_Product_ID as M_Produ35_388_, fin_finacc0_.C_Salesregion_ID as C_Sales36_388_, fin_finacc0_.C_Costcenter_ID as C_Costc37_388_, fin_finacc0_.EM_Aprm_Processed as EM_Aprm38_388_, fin_finacc0_.EM_Obpos_App_Cashup_ID as EM_Obpo39_388_, fin_finacc0_.EM_Aprm_Finacc_Trans_Origin as EM_Aprm40_388_ from FIN_Finacc_Transaction fin_finacc0_ where fin_finacc0_.Fin_Financial_Account_ID=$1 and (fin_finacc0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (fin_finacc0_.AD_Client_ID in ($40 , $41)) order by fin_finacc0_.Statementdate, fin_finacc0_.Fin_Finacc_Transaction_ID limit $42
4548d95ea5SELECT COUNT(*) AS ID FROM C_OrderLine WHERE C_Tax_ID = $1 AND EXISTS (SELECT $2 FROM C_Order WHERE C_Order.C_Order_ID = C_OrderLine.C_Order_ID AND C_Order.IsSOTrx=$3) AND AD_ORG_ID IN ($4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41) AND AD_CLIENT_ID IN ($42)
b9a73dbea9SELECT AD_CLIENT_ID,AD_ORG_ID, ISACTIVE, UPDATED,UPDATEDBY,ALIAS, COMBINATION, DESCRIPTION, ISFULLYQUALIFIED, C_ACCTSCHEMA_ID, ACCOUNT_ID, M_PRODUCT_ID, C_BPARTNER_ID,AD_ORGTRX_ID, C_LOCFROM_ID, C_LOCTO_ID, C_SALESREGION_ID, C_PROJECT_ID, C_CAMPAIGN_ID, C_ACTIVITY_ID, USER1_ID,USER2_ID, $2 as UseSuspenseBalancing, $3 as SuspenseBalancing_Acct, $4 as UseSuspenseError, $5 as SuspenseError_Acct, $6 as UseCurrencyBalancing, $7 as CurrencyBalancing_Acct, $8 as RetainedEarning_Acct, $9 as IncomeSummary_Acct, $10 as InterCompanyDueTo_Acct, $11 as InterCompanyDueFrom_Acct FROM C_ValidCombination WHERE C_ValidCombination_ID=$1
f2e5c3fd88SELECT $2 FROM ONLY "public"."m_product" x WHERE "m_product_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
df8f3b3becselect fin_finacc0_.Fin_Finacc_Transaction_ID as Fin_Fina1_388_, fin_finacc0_.AD_Client_ID as AD_Clien2_388_, fin_finacc0_.AD_Org_ID as AD_Org_I3_388_, fin_finacc0_.Created as Created4_388_, fin_finacc0_.Createdby as Createdb5_388_, fin_finacc0_.Updated as Updated6_388_, fin_finacc0_.Updatedby as Updatedb7_388_, fin_finacc0_.Isactive as Isactive8_388_, fin_finacc0_.C_Currency_ID as C_Curren9_388_, fin_finacc0_.Fin_Financial_Account_ID as Fin_Fin10_388_, fin_finacc0_.Line as Line11_388_, fin_finacc0_.Fin_Payment_ID as Fin_Pay12_388_, fin_finacc0_.DateAcct as DateAcc13_388_, fin_finacc0_.C_Glitem_ID as C_Glite14_388_, fin_finacc0_.Status as Status15_388_, fin_finacc0_.Paymentamt as Payment16_388_, fin_finacc0_.Depositamt as Deposit17_388_, fin_finacc0_.Processed as Process18_388_, fin_finacc0_.Processing as Process19_388_, fin_finacc0_.Posted as Posted20_388_, fin_finacc0_.C_Project_ID as C_Proje21_388_, fin_finacc0_.C_Campaign_ID as C_Campa22_388_, fin_finacc0_.C_Activity_ID as C_Activ23_388_, fin_finacc0_.User1_ID as User24_388_, fin_finacc0_.User2_ID as User25_388_, fin_finacc0_.Trxtype as Trxtype26_388_, fin_finacc0_.Statementdate as Stateme27_388_, fin_finacc0_.Description as Descrip28_388_, fin_finacc0_.FIN_Reconciliation_ID as FIN_Rec29_388_, fin_finacc0_.CreatedByAlgorithm as Created30_388_, fin_finacc0_.Foreign_Currency_ID as Foreign31_388_, fin_finacc0_.Foreign_Convert_Rate as Foreign32_388_, fin_finacc0_.Foreign_Amount as Foreign33_388_, fin_finacc0_.C_Bpartner_ID as C_Bpart34_388_, fin_finacc0_.M_Product_ID as M_Produ35_388_, fin_finacc0_.C_Salesregion_ID as C_Sales36_388_, fin_finacc0_.C_Costcenter_ID as C_Costc37_388_, fin_finacc0_.EM_Aprm_Processed as EM_Aprm38_388_, fin_finacc0_.EM_Obpos_App_Cashup_ID as EM_Obpo39_388_, fin_finacc0_.EM_Aprm_Finacc_Trans_Origin as EM_Aprm40_388_ from FIN_Finacc_Transaction fin_finacc0_ where fin_finacc0_.Fin_Financial_Account_ID=$1 and (fin_finacc0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (fin_finacc0_.AD_Client_ID in ($40 , $41)) order by fin_finacc0_.Paymentamt desc, fin_finacc0_.Fin_Finacc_Transaction_ID desc limit $42
09f3a2812fselect invoice0_.C_Invoice_ID as C_Invoic1_260_, invoice0_.AD_Client_ID as AD_Clien2_260_, invoice0_.AD_Org_ID as AD_Org_I3_260_, invoice0_.IsActive as IsActive4_260_, invoice0_.Created as Created5_260_, invoice0_.CreatedBy as CreatedB6_260_, invoice0_.Updated as Updated7_260_, invoice0_.UpdatedBy as UpdatedB8_260_, invoice0_.IsSOTrx as IsSOTrx9_260_, invoice0_.DocumentNo as Documen10_260_, invoice0_.DocStatus as DocStat11_260_, invoice0_.DocAction as DocActi12_260_, invoice0_.Processing as Process13_260_, invoice0_.Processed as Process14_260_, invoice0_.Posted as Posted15_260_, invoice0_.C_DocType_ID as C_DocTy16_260_, invoice0_.C_DocTypeTarget_ID as C_DocTy17_260_, invoice0_.C_Order_ID as C_Order18_260_, invoice0_.Description as Descrip19_260_, invoice0_.IsPrinted as IsPrint20_260_, invoice0_.SalesRep_ID as SalesRe21_260_, invoice0_.DateInvoiced as DateInv22_260_, invoice0_.DatePrinted as DatePri23_260_, invoice0_.DateAcct as DateAcc24_260_, invoice0_.C_BPartner_ID as C_BPart25_260_, invoice0_.C_BPartner_Location_ID as C_BPart26_260_, invoice0_.POReference as PORefer27_260_, invoice0_.IsDiscountPrinted as IsDisco28_260_, invoice0_.DateOrdered as DateOrd29_260_, invoice0_.C_Currency_ID as C_Curre30_260_, invoice0_.C_PaymentTerm_ID as C_Payme31_260_, invoice0_.C_Charge_ID as C_Charg32_260_, invoice0_.ChargeAmt as ChargeA33_260_, invoice0_.TotalLines as TotalLi34_260_, invoice0_.GrandTotal as GrandTo35_260_, invoice0_.M_PriceList_ID as M_Price36_260_, invoice0_.IsTaxIncluded as IsTaxIn37_260_, invoice0_.C_Campaign_ID as C_Campa38_260_, invoice0_.C_Project_ID as C_Proje39_260_, invoice0_.C_Activity_ID as C_Activ40_260_, invoice0_.CreateFrom as CreateF41_260_, invoice0_.GenerateTo as Generat42_260_, invoice0_.AD_User_ID as AD_User43_260_, invoice0_.CopyFrom as CopyFro44_260_, invoice0_.IsSelfService as IsSelfS45_260_, invoice0_.AD_OrgTrx_ID as AD_OrgT46_260_, invoice0_.User1_ID as User47_260_, invoice0_.User2_ID as User48_260_, invoice0_.Withholdingamount as Withhol49_260_, invoice0_.Taxdate as Taxdate50_260_, invoice0_.C_Withholding_ID as C_Withh51_260_, invoice0_.Ispaid as Ispaid52_260_, invoice0_.EM_Einv_Generated as EM_Einv53_260_, invoice0_.Totalpaid as Totalpa54_260_, invoice0_.EM_Einv_Sent as EM_Einv55_260_, invoice0_.OutstandingAmt as Outstan56_260_, invoice0_.DaysTillDue as DaysTil57_260_, invoice0_.DueAmt as DueAmt58_260_, invoice0_.LastCalculatedOnDate as LastCal59_260_, invoice0_.FIN_Paymentmethod_ID as FIN_Pay60_260_, invoice0_.FIN_Payment_Priority_ID as FIN_Pay61_260_, invoice0_.Finalsettlement as Finalse62_260_, invoice0_.Daysoutstanding as Daysout63_260_, invoice0_.Percentageoverdue as Percent64_260_, invoice0_.C_Costcenter_ID as C_Costc65_260_, invoice0_.Calculate_Promotions as Calcula66_260_, invoice0_.A_Asset_ID as A_Asset67_260_, invoice0_.EM_APRM_Addpayment as EM_APRM68_260_, invoice0_.Iscashvat as Iscashv69_260_, invoice0_.EM_APRM_Processinvoice as EM_APRM70_260_, invoice0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm71_260_, invoice0_.Prepaymentamt as Prepaym72_260_, invoice0_.Createfromorders as Createf73_260_, invoice0_.Createfrominouts as Createf74_260_, invoice0_.EM_Advcrm_Newactivity as EM_Advc75_260_, invoice0_.Paidamtatinvoicing as Paidamt76_260_, invoice0_.EM_Obpos_Rounding_Amount as EM_Obpo77_260_, invoice0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc78_260_, invoice0_.BPartner_ExtRef as BPartne79_260_, invoice0_.EM_Aeatsii_Send as EM_Aeat80_260_, invoice0_.EM_Obpos_Sequencename as EM_Obpo81_260_, invoice0_.EM_Aeatsii_Issent as EM_Aeat82_260_, invoice0_.EM_Obpos_Sequencenumber as EM_Obpo83_260_, invoice0_.EM_Aeatsii_Fecha_Operacion as EM_Aeat84_260_, invoice0_.EM_Aeatsii_Clave_Tipo as EM_Aeat85_260_, invoice0_.EM_Aeatsii_Motivo_Rectif as EM_Aeat86_260_, invoice0_.EM_Prouti_Recalculate_Price as EM_Prou87_260_, invoice0_.EM_Aeatsii_Clave_Tipo_Fc as EM_Aeat88_260_, invoice0_.EM_Ml_Select_Product as EM_Ml_S89_260_, invoice0_.EM_Prouti_Pricecalculatetdate as EM_Prou90_260_, invoice0_.EM_Aeatsii_Tipo_Rectif as EM_Aeat91_260_, invoice0_.EM_Prouti_Totalizations as EM_Prou92_260_, invoice0_.EM_Aeatsii_Dua as EM_Aeat93_260_, invoice0_.EM_Aeatsii_Fecha_Dua as EM_Aeat94_260_, invoice0_.EM_Aeatsii_Estado as EM_Aeat95_260_, invoice0_.EM_Aeatsii_Error_Registral as EM_Aeat96_260_, invoice0_.EM_Aeatsii_Modif as EM_Aeat97_260_, invoice0_.EM_Aeatsii_Modified as EM_Aeat98_260_, invoice0_.EM_Aeatsii_Description_ID as EM_Aeat99_260_, invoice0_.EM_Aeatsii_Descripcion_Sii as EM_Aea100_260_, invoice0_.EM_Aeatsii_Fecha_Reg_Cont as EM_Aea101_260_, invoice0_.EM_Aeatsii_Dup as EM_Aea102_260_, invoice0_.EM_Aeatsii_Error_Code as EM_Aea103_260_, invoice0_.EM_Aeatsii_Error_Msg as EM_Aea104_260_, invoice0_.EM_Aeatsii_Unsubscribe as EM_Aea105_260_, invoice0_.EM_Aeatsii_Pur_Description_ID as EM_Aea106_260_, invoice0_.EM_Aeatsii_Multi_Dua as EM_Aea107_260_, invoice0_.EM_Aeatsii_Ejercicio as EM_Aea108_260_, invoice0_.EM_Aeatsii_Periodo as EM_Aea109_260_, invoice0_.EM_Aeatsii_Autofactura as EM_Aea110_260_, invoice0_.EM_Aeatsii_Invoice_ID as EM_Aea111_260_, invoice0_.EM_Aeatsii_Insiidate as EM_Aea112_260_, invoice0_.EM_Aeatsii_Cause_Exemption_ID as EM_Aea113_260_, invoice0_.EM_Aeatsii_Isauthorization as EM_Aea114_260_, invoice0_.EM_Aeatsii_Authorizationno as EM_Aea115_260_, invoice0_.EM_Priuti_Createpurchinv as EM_Pri116_260_, invoice0_.EM_Priuti_Generated as EM_Pri117_260_, invoice0_.EM_Priuti_Date_Complete as EM_Pri118_260_, invoice0_.EM_Prges_Expediente_ID as EM_Prg119_260_, invoice0_.EM_Priuti_User_Complete_ID as EM_Pri120_260_, invoice0_.EM_Prges_Annotation_ID as EM_Prg121_260_, invoice0_.EM_Prges_Record_Number as EM_Prg122_260_, invoice0_.EM_Priuti_Status_Of_Review as EM_Pri123_260_, invoice0_.EM_Prges_Grantotal as EM_Prg124_260_, invoice0_.EM_Priuti_Validate as EM_Pri125_260_, invoice0_.EM_Priuti_Start_Review as EM_Pri126_260_, invoice0_.EM_Prges_Poreference as EM_Prg127_260_, invoice0_.em_cactl_createfromship as em_cac128_260_ from C_Invoice invoice0_ where invoice0_.IsSOTrx=$42 and invoice0_.DocStatus<>$43 and (invoice0_.AD_Org_ID in ($1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38)) and (invoice0_.AD_Client_ID in ($39 , $40)) order by invoice0_.DateInvoiced desc, invoice0_.C_Invoice_ID desc limit $41
fec93ea334UPDATE M_STORAGE_DETAIL SET QTYONHAND=QTYONHAND + COALESCE(p_qty, $20), QTYORDERONHAND=QTYORDERONHAND + v_qtyorder, DATELASTINVENTORY=COALESCE(p_datelastinventory, DATELASTINVENTORY), PREQTYONHAND=PREQTYONHAND + COALESCE(p_preqty, $21), PREQTYORDERONHAND=PREQTYORDERONHAND + v_preqtyorder, AD_CLIENT_ID=p_client, UPDATED=TO_DATE(NOW()), UPDATEDBY=p_user WHERE M_PRODUCT_ID=p_product AND M_LOCATOR_ID=p_locator AND M_ATTRIBUTESETINSTANCE_ID=v_attributesetinstance AND C_UOM_ID=p_uom AND COALESCE(M_PRODUCT_UOM_ID, $22)=COALESCE(p_product_uom, $23)
b93f3a3e02select count(*) as y0_ from AD_TreeNode this_ where this_.Node_ID=$1 and this_.Parent_ID<>$2 and this_.IsActive=$3
0a92390e0dselect invoice0_.DocumentNo as col_0_0_, businesspa2_.Name as col_1_0_, invoice0_.DateInvoiced as col_2_0_, organizati3_.Name as col_3_0_, adlisttrl1_.Name as col_4_0_ from C_Invoice invoice0_ cross join C_BPartner businesspa2_ cross join AD_Org organizati3_ cross join AD_Ref_List_Trl adlisttrl1_ cross join AD_Ref_List adlist4_ where invoice0_.C_BPartner_ID=businesspa2_.C_BPartner_ID and invoice0_.AD_Org_ID=organizati3_.AD_Org_ID and adlisttrl1_.AD_Ref_List_ID=adlist4_.AD_Ref_List_ID and invoice0_.EM_Priuti_Status_Of_Review<>$4 and adlist4_.Value=invoice0_.EM_Priuti_Status_Of_Review and adlist4_.AD_Reference_ID=$5 and adlisttrl1_.AD_Language=$1 and ($2 in (select priuti_inv6_.AD_User_ID from priuti_invoice_reviewers priuti_inv6_ where priuti_inv6_.C_Invoice_ID=invoice0_.C_Invoice_ID and (priuti_inv6_.Sequence in (select coalesce(min(priuti_inv7_.Sequence), $6) from priuti_invoice_reviewers priuti_inv7_ where priuti_inv7_.C_Invoice_ID=invoice0_.C_Invoice_ID and (priuti_inv7_.Result is null))))) limit $3
8d75ee1767INSERT INTO Fact_Acct (Fact_Acct_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy, C_AcctSchema_ID,Account_ID, AcctValue, AcctDescription,DateTrx,DateAcct, C_Period_ID,AD_Table_ID,Record_ID,Line_ID, GL_Category_ID,C_Tax_ID,PostingType,C_Currency_ID, AmtSourceDR,AmtSourceCR,AmtAcctDR,AmtAcctCR, C_UOM_ID,Qty,M_Locator_ID,M_Product_ID,C_BPartner_ID,AD_OrgTrx_ID,C_LocFrom_ID,C_LocTo_ID,C_SalesRegion_ID, C_Project_ID,C_Campaign_ID,C_Activity_ID,User1_ID,User2_ID,Description, Fact_Acct_Group_ID, SeqNo, DocBaseType, Record_ID2, A_ASSET_ID, C_WithHolding_ID, C_DocType_ID, C_Costcenter_ID, FACTACCTTYPE) VALUES ($1, $2, $3,$48,now(),$4,now(),$5, $6, $7, $8, $9, TO_DATE($10), TO_DATE($11), $12, $13, $14, $15, $16, $17, $18, $19, TO_NUMBER($20), TO_NUMBER($21), TO_NUMBER($22), TO_NUMBER($23), $24, TO_NUMBER($25), $26,$27, $28, $29,$30, $31, $32,$33, $34, $35,$36, $37, $38, $39, TO_NUMBER($40), $41, $42, $43, $44, $45, $46, $47)
d5074afa0fSELECT count(*) FROM aprm_finacc_transaction_v inner join fin_finacc_transaction ON aprm_finacc_transaction_v.aprm_finacc_transaction_v_id = fin_finacc_transaction.fin_finacc_transaction_id WHERE aprm_finacc_transaction_v.fin_financial_account_id=$1
fe49fa204fupdate M_Transaction set Updated=$1, UpdatedBy=$2, TransactionCost=$3, M_Costing_Algorithm_ID=$4, IsCostCalculated=$5, C_Currency_ID=$6, Costing_Status=$7 where M_Transaction_ID=$8
10f4e6f2bfSELECT COUNT(*) AS TOTAL FROM AD_SESSION WHERE AD_SESSION_ID = $1 AND SESSION_ACTIVE = $2 AND ISACTIVE = $3
320ed06a6dinsert into C_InvoiceLine (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, C_Invoice_ID, C_OrderLine_ID, M_InOutLine_ID, Line, Description, Financial_Invoice_Line, M_Product_ID, QtyInvoiced, PriceList, PriceActual, LineNetAmt, C_UOM_ID, C_Tax_ID, IsDescription, PriceStd, Excludeforwithholding, Iseditlinenetamt, Line_Gross_Amount, Gross_Unit_Price, C_Bpartner_ID, grosspricestd, Grosspricelist, IsDeferred, Explode, Match_Lccosts, EM_Prdd_Distribute_Dimensions, EM_Priuti_Discount, EM_Priuti_Updatepricelist, EM_Priuti_Pricelist_Updated, C_InvoiceLine_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37)
2c756b6487vacuum analyze obmobc_logclient
2c52c242a6INSERT INTO ad_session_usage_audit (ad_session_usage_audit_id, ad_client_id, ad_org_id, createdby, updatedby, ad_session_id, object_id, ad_module_id, command, classname, object_type, process_time) VALUES (get_uuid(),$10,$11,$1,$2,$3,$4,$5,$6,$7,$8,to_number($9))
e4b8f19235select order0_.C_Order_ID as C_Order_1_276_, order0_.AD_Client_ID as AD_Clien2_276_, order0_.AD_Org_ID as AD_Org_I3_276_, order0_.IsActive as IsActive4_276_, order0_.Created as Created5_276_, order0_.CreatedBy as CreatedB6_276_, order0_.Updated as Updated7_276_, order0_.UpdatedBy as UpdatedB8_276_, order0_.IsSOTrx as IsSOTrx9_276_, order0_.DocumentNo as Documen10_276_, order0_.DocStatus as DocStat11_276_, order0_.DocAction as DocActi12_276_, order0_.Processing as Process13_276_, order0_.Processed as Process14_276_, order0_.C_DocType_ID as C_DocTy15_276_, order0_.C_DocTypeTarget_ID as C_DocTy16_276_, order0_.Description as Descrip17_276_, order0_.IsDelivered as IsDeliv18_276_, order0_.IsInvoiced as IsInvoi19_276_, order0_.IsPrinted as IsPrint20_276_, order0_.IsSelected as IsSelec21_276_, order0_.SalesRep_ID as SalesRe22_276_, order0_.DateOrdered as DateOrd23_276_, order0_.DatePromised as DatePro24_276_, order0_.DatePrinted as DatePri25_276_, order0_.DateAcct as DateAcc26_276_, order0_.C_BPartner_ID as C_BPart27_276_, order0_.BillTo_ID as BillTo_28_276_, order0_.C_BPartner_Location_ID as C_BPart29_276_, order0_.POReference as PORefer30_276_, order0_.IsDiscountPrinted as IsDisco31_276_, order0_.C_Currency_ID as C_Curre32_276_, order0_.PaymentRule as Payment33_276_, order0_.C_PaymentTerm_ID as C_Payme34_276_, order0_.InvoiceRule as Invoice35_276_, order0_.DeliveryRule as Deliver36_276_, order0_.FreightCostRule as Freight37_276_, order0_.FreightAmt as Freight38_276_, order0_.DeliveryViaRule as Deliver39_276_, order0_.M_Shipper_ID as M_Shipp40_276_, order0_.C_Charge_ID as C_Charg41_276_, order0_.ChargeAmt as ChargeA42_276_, order0_.PriorityRule as Priorit43_276_, order0_.TotalLines as TotalLi44_276_, order0_.GrandTotal as GrandTo45_276_, order0_.M_Warehouse_ID as M_Wareh46_276_, order0_.M_PriceList_ID as M_Price47_276_, order0_.IsTaxIncluded as IsTaxIn48_276_, order0_.C_Campaign_ID as C_Campa49_276_, order0_.C_Project_ID as C_Proje50_276_, order0_.C_Activity_ID as C_Activ51_276_, order0_.Posted as Posted52_276_, order0_.AD_User_ID as AD_User53_276_, order0_.CopyFrom as CopyFro54_276_, order0_.DropShip_BPartner_ID as DropShi55_276_, order0_.DropShip_Location_ID as DropShi56_276_, order0_.DropShip_User_ID as DropShi57_276_, order0_.IsSelfService as IsSelfS58_276_, order0_.AD_OrgTrx_ID as AD_OrgT59_276_, order0_.User1_ID as User60_276_, order0_.User2_ID as User61_276_, order0_.Deliverynotes as Deliver62_276_, order0_.C_Incoterms_ID as C_Incot63_276_, order0_.Incotermsdescription as Incoter64_276_, order0_.Generatetemplate as Generat65_276_, order0_.Delivery_Location_ID as Deliver66_276_, order0_.CopyFromPO as CopyFro67_276_, order0_.FIN_Paymentmethod_ID as FIN_Pay68_276_, order0_.FIN_Payment_Priority_ID as FIN_Pay69_276_, order0_.RM_PickFromShipment as RM_Pick70_276_, order0_.RM_ReceiveMaterials as RM_Rece71_276_, order0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm72_276_, order0_.RM_CreateInvoice as RM_Crea73_276_, order0_.C_Return_Reason_ID as C_Retur74_276_, order0_.RM_AddOrphanLine as RM_AddO75_276_, order0_.A_Asset_ID as A_Asset76_276_, order0_.Calculate_Promotions as Calcula77_276_, order0_.C_Costcenter_ID as C_Costc78_276_, order0_.Convertquotation as Convert79_276_, order0_.C_Reject_Reason_ID as C_Rejec80_276_, order0_.validuntil as validun81_276_, order0_.Quotation_ID as Quotati82_276_, order0_.SO_Res_Status as SO_Res_83_276_, order0_.Create_POLines as Create_84_276_, order0_.EM_Obdisc_Addpack as EM_Obdi85_276_, order0_.Iscashvat as Iscashv86_276_, order0_.EM_OBMFM_Selectfreight as EM_OBMF87_276_, order0_.EM_OBMFM_Delivery_Period_ID as EM_OBMF88_276_, order0_.RM_Pickfromreceipt as RM_Pick89_276_, order0_.Cancelandreplace as Cancela90_276_, order0_.EM_Advcrm_Newactivity as EM_Advc91_276_, order0_.EM_APRM_AddPayment as EM_APRM92_276_, order0_.EM_OBMFM_Delivery_Charges as EM_OBMF93_276_, order0_.EM_OBMFM_Freight_ID as EM_OBMF94_276_, order0_.EM_Obwpl_Generatepicking as EM_Obwp95_276_, order0_.EM_Advcrm_Opportunity_ID as EM_Advc96_276_, order0_.EM_OBMFM_Weight as EM_OBMF97_276_, order0_.EM_Obwpl_Isinpickinglist as EM_Obwp98_276_, order0_.EM_Rcinv_Contractdate as EM_Rcin99_276_, order0_.EM_Obwpl_Readypl as EM_Obw100_276_, order0_.EM_Rcinv_Initialdate as EM_Rci101_276_, order0_.EM_Rcinv_Enddate as EM_Rci102_276_, order0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_276_, order0_.EM_OBMFM_Weight_Uom_ID as EM_OBM104_276_, order0_.EM_Rcinv_Frequency as EM_Rci105_276_, order0_.EM_OBMFM_Set_Weight as EM_OBM106_276_, order0_.EM_Rcinv_Renewautomatically as EM_Rci107_276_, order0_.EM_Aeatsii_Fecha_Operacion as EM_Aea108_276_, order0_.EM_Ml_Select_Product as EM_Ml_109_276_, order0_.EM_Rcinv_Renovationtimes as EM_Rci110_276_, order0_.Confirmcancelandreplace as Confir111_276_, order0_.EM_Aeatsii_Descripcion_Sii as EM_Aea112_276_, order0_.EM_Obpos_Applications_ID as EM_Obp113_276_, order0_.EM_Rcinv_Freqrenovationtime as EM_Rci114_276_, order0_.EM_Obpos_Sendemail as EM_Obp115_276_, order0_.EM_Rcinv_Ordercontract_ID as EM_Rci116_276_, order0_.EM_Obpos_Email_Status as EM_Obp117_276_, order0_.EM_Rcinv_Freqtime as EM_Rci118_276_, order0_.Cancelledorder_id as Cancel119_276_, order0_.EM_Obpos_App_Cashup_ID as EM_Obp120_276_, order0_.EM_Obpos_Createdabsolute as EM_Obp121_276_, order0_.Replacedorder_id as Replac122_276_, order0_.EM_OBPOS_NotInvoiceOnCashUp as EM_OBP123_276_, order0_.EM_Obpos_Rejected_Quotat_ID as EM_Obp124_276_, order0_.EM_Obpos_Isdeleted as EM_Obp125_276_, order0_.Iscancelled as Iscanc126_276_, order0_.EM_Obpos_Islayaway as EM_Obp127_276_, order0_.EM_Obpos_Prepaymentamt as EM_Obp128_276_, order0_.Replacementorder_ID as Replac129_276_, order0_.EM_Obpos_Prepaymentlimitamt as EM_Obp130_276_, order0_.EM_Obpos_Prepaymentlaylimitamt as EM_Obp131_276_, order0_.EM_Obpos_Rounding_Amount as EM_Obp132_276_, order0_.BPartner_ExtRef as BPartn133_276_, order0_.EM_Obpos_Sequencename as EM_Obp134_276_, order0_.EM_Prqc_Clauses_Selector as EM_Prq135_276_, order0_.EM_Obpos_Sequencenumber as EM_Obp136_276_, order0_.EM_Rcinv_Cancelcontract as EM_Rci137_276_, order0_.EM_Rcinv_Cancelleddate as EM_Rci138_276_, order0_.EM_Rcinv_Iscancelled as EM_Rci139_276_, order0_.EM_Psat_Activity_ID as EM_Psa140_276_, order0_.EM_OBSMAIL_EmailAddress as EM_OBS141_276_, order0_.EM_Prouti_Order_Stock as EM_Pro142_276_, order0_.EM_Prouti_Pregenerate_Minout as EM_Pro143_276_, order0_.EM_Prouti_Sotopo as EM_Pro144_276_, order0_.EM_Prouti_Generate_Pick_Inv as EM_Pro145_276_, order0_.EM_Pricm_Order_ID as EM_Pri146_276_, order0_.EM_Prouti_Order_ID as EM_Pro147_276_, order0_.EM_Prouti_Grandtotalinitial as EM_Pro148_276_, order0_.EM_Prouti_Dateclosed as EM_Pro149_276_, order0_.EM_Prouti_Totallinesinitial as EM_Pro150_276_, order0_.EM_Prouti_Changebpartner as EM_Pro151_276_, order0_.EM_Prouti_Recalculate_Price as EM_Pro152_276_, order0_.em_prqr_execute as em_prq153_276_, order0_.EM_Prouti_Pricecalculatetdate as EM_Pro154_276_, order0_.EM_Prqr_Execute_Purchase as EM_Prq155_276_, order0_.EM_Prouti_Reactiveorder as EM_Pro156_276_, order0_.EM_Prqr_Return_Select_Prod as EM_Prq157_276_, order0_.EM_Prouti_Totalizations as EM_Pro158_276_, order0_.em_prouti_Invoiced as em_pro159_276_, order0_.em_prouti_Received as em_pro160_276_, order0_.em_prouti_initial_received as em_pro161_276_, order0_.EM_Prouti_Status_Of_Review as EM_Pro162_276_, order0_.EM_Prouti_Validate_Order as EM_Pro163_276_, order0_.EM_Prouti_Start_Review as EM_Pro164_276_, order0_.EM_Ml_Select_Product_Byattrib as EM_Ml_165_276_, order0_.EM_Prres_Reservation_ID as EM_Prr166_276_, order0_.EM_Prres_Responsible_ID as EM_Prr167_276_, order0_.EM_Prres_Diners as EM_Prr168_276_, order0_.EM_Prres_Sended as EM_Prr169_276_, order0_.EM_Prres_Printed as EM_Prr170_276_, order0_.EM_Prouti_Initial_Bp_ID as EM_Pro171_276_, order0_.EM_Prouti_Addlines_Btn as EM_Pro172_276_, order0_.EM_Prtoma_Tomaticket_ID as EM_Prt173_276_, order0_.EM_Cactl_IsCopy as EM_Cac174_276_, order0_.EM_Prtoma_Jsonorder as EM_Prt175_276_, order0_.EM_Prres_Paid_On_Credit as EM_Prr176_276_, order0_.EM_Prtoma_Grossamount as EM_Prt177_276_, order0_.EM_Cactl_Internal_Notes_Group as EM_Cac178_276_, order0_.EM_Prouti_Changebpartner_Bgt as EM_Pro179_276_, order0_.EM_Prrgr_Locator_ID as EM_Prr180_276_, order0_.EM_Paytef_Transactionreference as EM_Pay181_276_, order0_.EM_Cactl_Indirect_Cost_ID as EM_Cac182_276_, order0_.EM_Cactl_Calculate_Cost as EM_Cac183_276_, order0_.EM_Cactl_Totalcost as EM_Cac184_276_, order0_.EM_Cactl_Forceselectedproject as EM_Cac185_276_, order0_.EM_Cactl_Verified_Return as EM_Cac186_276_, order0_.EM_Cactl_Duplicate_Budget as EM_Cac187_276_, order0_.EM_Prres_Orig_Order_ID as EM_Prr188_276_, order0_.EM_Prcpr_Is_Cloned as EM_Prc189_276_, order0_.EM_Prouti_Select_Soline as EM_Pro190_276_, order0_.EM_Prouti_Return_Quantity as EM_Pro191_276_, order0_.EM_Prqr_Executecredit as EM_Prq192_276_, order0_.Em_Prqr_Credit_Purchase_ID as Em_Prq193_276_ from C_Order order0_ cross join C_DocType documentty1_ where order0_.C_DocTypeTarget_ID=documentty1_.C_DocType_ID and order0_.IsSOTrx=$42 and documentty1_.IsReturn=$43 and (order0_.AD_Org_ID in ($1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38)) and (order0_.AD_Client_ID in ($39 , $40)) order by order0_.DatePromised desc, order0_.C_Order_ID desc limit $41
f66a111527select materialmg0_.M_Production_ID as M_Produc1_526_, materialmg0_.AD_Client_ID as AD_Clien2_526_, materialmg0_.AD_Org_ID as AD_Org_I3_526_, materialmg0_.IsActive as IsActive4_526_, materialmg0_.Created as Created5_526_, materialmg0_.CreatedBy as CreatedB6_526_, materialmg0_.Updated as Updated7_526_, materialmg0_.UpdatedBy as UpdatedB8_526_, materialmg0_.Name as Name9_526_, materialmg0_.Description as Descrip10_526_, materialmg0_.MovementDate as Movemen11_526_, materialmg0_.IsCreated as IsCreat12_526_, materialmg0_.Posted as Posted13_526_, materialmg0_.Processed as Process14_526_, materialmg0_.Processing as Process15_526_, materialmg0_.AD_OrgTrx_ID as AD_OrgT16_526_, materialmg0_.C_Project_ID as C_Proje17_526_, materialmg0_.C_Campaign_ID as C_Campa18_526_, materialmg0_.C_Activity_ID as C_Activ19_526_, materialmg0_.User1_ID as User20_526_, materialmg0_.User2_ID as User21_526_, materialmg0_.DocumentNo as Documen22_526_, materialmg0_.Endtime as Endtime23_526_, materialmg0_.IsSOTrx as IsSOTrx24_526_, materialmg0_.Starttime as Startti25_526_, materialmg0_.Validating as Validat26_526_, materialmg0_.C_Costcenter_ID as C_Costc27_526_, materialmg0_.A_Asset_ID as A_Asset28_526_, materialmg0_.EM_Obbom_C_Order_ID as EM_Obbo29_526_, materialmg0_.EM_Pruti_Add_Bom_Product as EM_Prut30_526_, materialmg0_.EM_Prres_Isreturned as EM_Prre31_526_ from M_Production materialmg0_ where materialmg0_.IsSOTrx=$42 and (materialmg0_.AD_Org_ID in ($1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38)) and (materialmg0_.AD_Client_ID in ($39 , $40)) order by materialmg0_.MovementDate desc, materialmg0_.M_Production_ID desc limit $41
79a215aba6SELECT COUNT(*) AS ID FROM C_OrderLineTax WHERE C_Tax_ID = $1 AND EXISTS (SELECT $2 FROM C_OrderLine WHERE C_OrderLine.C_Orderline_ID = C_OrderLineTax.C_Orderline_ID AND EXISTS (SELECT $3 FROM C_Order WHERE C_Order.C_Order_ID = C_OrderLine.C_Order_ID AND C_Order.IsSOTrx=$4)) AND AD_ORG_ID NOT IN ($5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42)
00c98130c9select materialmg0_.M_Transaction_ID as M_Transa1_558_, materialmg0_.AD_Client_ID as AD_Clien2_558_, materialmg0_.AD_Org_ID as AD_Org_I3_558_, materialmg0_.IsActive as IsActive4_558_, materialmg0_.Created as Created5_558_, materialmg0_.CreatedBy as CreatedB6_558_, materialmg0_.Updated as Updated7_558_, materialmg0_.UpdatedBy as UpdatedB8_558_, materialmg0_.MovementType as Movement9_558_, materialmg0_.M_Locator_ID as M_Locat10_558_, materialmg0_.M_Product_ID as M_Produ11_558_, materialmg0_.MovementDate as Movemen12_558_, materialmg0_.MovementQty as Movemen13_558_, materialmg0_.M_InventoryLine_ID as M_Inven14_558_, materialmg0_.M_MovementLine_ID as M_Movem15_558_, materialmg0_.M_InOutLine_ID as M_InOut16_558_, materialmg0_.M_ProductionLine_ID as M_Produ17_558_, materialmg0_.C_ProjectIssue_ID as C_Proje18_558_, materialmg0_.M_AttributeSetInstance_ID as M_Attri19_558_, materialmg0_.M_Product_Uom_Id as M_Produ20_558_, materialmg0_.QuantityOrder as Quantit21_558_, materialmg0_.C_UOM_ID as C_UOM_I22_558_, materialmg0_.M_Internal_Consumptionline_ID as M_Inter23_558_, materialmg0_.TransactionCost as Transac24_558_, materialmg0_.TrxProcessDate as TrxProc25_558_, materialmg0_.M_Costing_Algorithm_ID as M_Costi26_558_, materialmg0_.IsCostCalculated as IsCostC27_558_, materialmg0_.C_Currency_ID as C_Curre28_558_, materialmg0_.Costing_Status as Costing29_558_, materialmg0_.Checkreservedqty as Checkre30_558_, materialmg0_.Isprocessed as Isproce31_558_, materialmg0_.Checkpricedifference as Checkpr32_558_, materialmg0_.EM_Prouti_Exported as EM_Prou33_558_, materialmg0_.Manualcostadjustment as Manualc34_558_, materialmg0_.IsCostPermanent as IsCostP35_558_, materialmg0_.EM_Pricm_Inoutline_ID as EM_Pric36_558_ from M_Transaction materialmg0_ inner join AD_Org organizati1_ on materialmg0_.AD_Org_ID=organizati1_.AD_Org_ID where materialmg0_.M_Product_ID=$1 and (materialmg0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (materialmg0_.AD_Client_ID in ($40 , $41)) order by organizati1_.Name, materialmg0_.M_Transaction_ID limit $42
718ca1759aSELECT COUNT(*) AS ID FROM C_InvoiceLine WHERE C_Tax_ID = $1 AND EXISTS (SELECT $2 FROM C_Invoice WHERE C_Invoice.C_Invoice_ID = C_InvoiceLine.C_Invoice_ID AND C_Invoice.IsSOTrx=$3) AND AD_ORG_ID NOT IN ($4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41)
a065237476select cactl_vari0_.Cactl_Variety_Product_ID as Cactl_Va1_366_, cactl_vari0_.AD_Client_ID as AD_Clien2_366_, cactl_vari0_.AD_Org_ID as AD_Org_I3_366_, cactl_vari0_.Isactive as Isactive4_366_, cactl_vari0_.Created as Created5_366_, cactl_vari0_.Createdby as Createdb6_366_, cactl_vari0_.Updated as Updated7_366_, cactl_vari0_.Updatedby as Updatedb8_366_, cactl_vari0_.M_Product_ID as M_Produc9_366_, cactl_vari0_.C_Bpartner_ID as C_Bpart10_366_, cactl_vari0_.C_Uom_ID as C_Uom_I11_366_, cactl_vari0_.Price as Price12_366_, cactl_vari0_.Cactl_Variety_ID as Cactl_V13_366_, cactl_vari0_.Pricelist as Priceli14_366_, cactl_vari0_.Date_From as Date_Fr15_366_, cactl_vari0_.Date_To as Date_To16_366_, cactl_vari0_.Vendorproductno as Vendorp17_366_, cactl_vari0_.Iscurrentvendor as Iscurre18_366_, cactl_vari0_.Isprocessing as Isproce19_366_ from cactl_variety_product cactl_vari0_ left outer join C_BPartner businesspa1_ on cactl_vari0_.C_Bpartner_ID=businesspa1_.C_BPartner_ID left outer join C_UOM uom2_ on cactl_vari0_.C_Uom_ID=uom2_.C_UOM_ID left outer join cactl_variety cactl_vari3_ on cactl_vari0_.Cactl_Variety_ID=cactl_vari3_.Cactl_Variety_ID where (cactl_vari0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41)) and (cactl_vari0_.AD_Client_ID in ($1 , $2)) and cactl_vari0_.Isactive=$42 order by businesspa1_.Value, businesspa1_.Name, businesspa1_.TaxID, businesspa1_.Name2, uom2_.Name, cactl_vari0_.Price, cactl_vari3_.Name, cactl_vari3_.Value, cactl_vari0_.Cactl_Variety_Product_ID limit $3
4a3e0e1397select businesspa0_.C_BPartner_ID as C_BPartn1_203_, businesspa0_.AD_Client_ID as AD_Clien2_203_, businesspa0_.AD_Org_ID as AD_Org_I3_203_, businesspa0_.IsActive as IsActive4_203_, businesspa0_.Created as Created5_203_, businesspa0_.CreatedBy as CreatedB6_203_, businesspa0_.Updated as Updated7_203_, businesspa0_.UpdatedBy as UpdatedB8_203_, businesspa0_.Value as Value9_203_, businesspa0_.Name as Name10_203_, businesspa0_.Name2 as Name11_203_, businesspa0_.Description as Descrip12_203_, businesspa0_.IsSummary as IsSumma13_203_, businesspa0_.C_BP_Group_ID as C_BP_Gr14_203_, businesspa0_.IsOneTime as IsOneTi15_203_, businesspa0_.IsProspect as IsProsp16_203_, businesspa0_.IsVendor as IsVendo17_203_, businesspa0_.IsCustomer as IsCusto18_203_, businesspa0_.IsEmployee as IsEmplo19_203_, businesspa0_.IsSalesRep as IsSales20_203_, businesspa0_.ReferenceNo as Referen21_203_, businesspa0_.DUNS as DUNS22_203_, businesspa0_.URL as URL23_203_, businesspa0_.AD_Language as AD_Lang24_203_, businesspa0_.TaxID as TaxID25_203_, businesspa0_.IsTaxExempt as IsTaxEx26_203_, businesspa0_.C_InvoiceSchedule_ID as C_Invoi27_203_, businesspa0_.Rating as Rating28_203_, businesspa0_.SalesVolume as SalesVo29_203_, businesspa0_.NumberEmployees as NumberE30_203_, businesspa0_.NAICS as NAICS31_203_, businesspa0_.FirstSale as FirstSa32_203_, businesspa0_.AcqusitionCost as Acqusit33_203_, businesspa0_.PotentialLifeTimeValue as Potenti34_203_, businesspa0_.ActualLifeTimeValue as ActualL35_203_, businesspa0_.ShareOfCustomer as ShareOf36_203_, businesspa0_.PaymentRule as Payment37_203_, businesspa0_.SO_CreditLimit as SO_Cred38_203_, businesspa0_.SO_CreditUsed as SO_Cred39_203_, businesspa0_.C_PaymentTerm_ID as C_Payme40_203_, businesspa0_.M_PriceList_ID as M_Price41_203_, businesspa0_.IsDiscountPrinted as IsDisco42_203_, businesspa0_.SO_Description as SO_Desc43_203_, businesspa0_.POReference as PORefer44_203_, businesspa0_.PaymentRulePO as Payment45_203_, businesspa0_.PO_PriceList_ID as PO_Pric46_203_, businesspa0_.PO_PaymentTerm_ID as PO_Paym47_203_, businesspa0_.DocumentCopies as Documen48_203_, businesspa0_.C_Greeting_ID as C_Greet49_203_, businesspa0_.InvoiceRule as Invoice50_203_, businesspa0_.DeliveryRule as Deliver51_203_, businesspa0_.DeliveryViaRule as Deliver52_203_, businesspa0_.SalesRep_ID as SalesRe53_203_, businesspa0_.BPartner_Parent_ID as BPartne54_203_, businesspa0_.SOCreditStatus as SOCredi55_203_, businesspa0_.AD_Forced_Org_ID as AD_Forc56_203_, businesspa0_.ShowPriceInOrder as ShowPri57_203_, businesspa0_.Invoicegrouping as Invoice58_203_, businesspa0_.FixMonthDay as FixMont59_203_, businesspa0_.FixMonthDay2 as FixMont60_203_, businesspa0_.Fixmonthday3 as Fixmont61_203_, businesspa0_.Isworker as Isworke62_203_, businesspa0_.UPC as UPC63_203_, businesspa0_.C_Salary_Category_ID as C_Salar64_203_, businesspa0_.Invoice_Printformat as Invoice65_203_, businesspa0_.Last_Days as Last_Da66_203_, businesspa0_.PO_Bankaccount_ID as PO_Bank67_203_, businesspa0_.PO_BP_TaxCategory_ID as PO_BP_T68_203_, businesspa0_.PO_Fixmonthday as PO_Fixm69_203_, businesspa0_.PO_Fixmonthday2 as PO_Fixm70_203_, businesspa0_.PO_Fixmonthday3 as PO_Fixm71_203_, businesspa0_.SO_Bankaccount_ID as SO_Bank72_203_, businesspa0_.SO_Bp_Taxcategory_ID as SO_Bp_T73_203_, businesspa0_.Fiscalcode as Fiscalc74_203_, businesspa0_.Isofiscalcode as Isofisc75_203_, businesspa0_.EM_Einv_Einvoice as EM_Einv76_203_, businesspa0_.PO_C_Incoterms_ID as PO_C_In77_203_, businesspa0_.EM_Einv_Format_Id as EM_Einv78_203_, businesspa0_.SO_C_Incoterms_ID as SO_C_In79_203_, businesspa0_.EM_Einv_Platform_Id as EM_Einv80_203_, businesspa0_.FIN_Paymentmethod_ID as FIN_Pay81_203_, businesspa0_.EM_Einv_Email as EM_Einv82_203_, businesspa0_.PO_Paymentmethod_ID as PO_Paym83_203_, businesspa0_.FIN_Financial_Account_ID as FIN_Fin84_203_, businesspa0_.EM_Einv_Deliverymode as EM_Einv85_203_, businesspa0_.PO_Financial_Account_ID as PO_Fina86_203_, businesspa0_.Customer_Blocking as Custome87_203_, businesspa0_.Vendor_Blocking as Vendor_88_203_, businesspa0_.SO_Payment_Blocking as SO_Paym89_203_, businesspa0_.PO_Payment_Blocking as PO_Paym90_203_, businesspa0_.SO_Invoice_Blocking as SO_Invo91_203_, businesspa0_.PO_Invoice_Blocking as PO_Invo92_203_, businesspa0_.SO_Order_Blocking as SO_Orde93_203_, businesspa0_.PO_Order_Blocking as PO_Orde94_203_, businesspa0_.SO_Goods_Blocking as SO_Good95_203_, businesspa0_.PO_Goods_Blocking as PO_Good96_203_, businesspa0_.Iscashvat as Iscashv97_203_, businesspa0_.EM_Advcrm_Newactivity as EM_Advc98_203_, businesspa0_.Update_Currency as Update_99_203_, businesspa0_.BP_Currency_ID as BP_Cur100_203_, businesspa0_.Birthplace as Birthp101_203_, businesspa0_.Birthday as Birthd102_203_, businesspa0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_203_, businesspa0_.Is_Customer_Consent as Is_Cus104_203_, businesspa0_.EM_OBSMAIL_INVOICEVIAEMAIL as EM_OBS105_203_, businesspa0_.EM_Obsepad_Mandate_Identifier as EM_Obs106_203_, businesspa0_.EM_Obsmail_Language as EM_Obs107_203_, businesspa0_.EM_Obsepad_Mandate_Date as EM_Obs108_203_, businesspa0_.EM_Aeatsii_Rep_Taxid as EM_Aea109_203_, businesspa0_.EM_Aeatsii_Menor as EM_Aea110_203_, businesspa0_.EM_Pricm_Isintercompany as EM_Pri111_203_, businesspa0_.EM_Psat_Billtobpartner_ID as EM_Psa112_203_, businesspa0_.EM_Psat_Locator_ID as EM_Psa113_203_, businesspa0_.EM_Psat_Mobile_Request as EM_Psa114_203_, businesspa0_.EM_Prges_Glitem_ID as EM_Prg115_203_, businesspa0_.EM_Rrhh_Exemployee as EM_Rrh116_203_, businesspa0_.EM_Rrhh_Candidate as EM_Rrh117_203_, businesspa0_.EM_Prpass_No_Print_Pass as EM_Prp118_203_, businesspa0_.EM_Rrhh_Holidays_Supervisor as EM_Rrh119_203_, businesspa0_.EM_Cactal_Emp_No as EM_Cac120_203_, businesspa0_.EM_Cactal_Emp_Relationship_No as EM_Cac121_203_, businesspa0_.EM_Obwpl_Bp_Block_Pickinglist as EM_Obw122_203_, businesspa0_.EM_Pruti_Addbp as EM_Pru123_203_, businesspa0_.EM_Prpass_Generatepassemployee as EM_Prp124_203_, businesspa0_.EM_Rrhh_Mainworkstation_ID as EM_Rrh125_203_, businesspa0_.EM_Rrhh_Bp_Transfer_Code as EM_Rrh126_203_, businesspa0_.EM_OBTIK_Tax_ID_Key as EM_OBT127_203_ from C_BPartner businesspa0_ where exists (select $3 from C_Order order1_ inner join C_BPartner businesspa2_ on order1_.C_BPartner_ID=businesspa2_.C_BPartner_ID where (upper((order1_.DocumentNo||$4||coalesce(to_char(order1_.DateOrdered), $5)||$6||coalesce(to_char(order1_.GrandTotal), $7))) like upper($1) escape $8) and businesspa2_.C_BPartner_ID=businesspa0_.C_BPartner_ID and (order1_.AD_Org_ID in ($9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41 , $42 , $43 , $44 , $45 , $46)) and (order1_.AD_Client_ID in ($47 , $48))) order by businesspa0_.Value, businesspa0_.Name, businesspa0_.TaxID, businesspa0_.Name2 limit $2
7b258c2827select cactl_vari0_.Cactl_Variety_Product_ID as Cactl_Va1_366_, cactl_vari0_.AD_Client_ID as AD_Clien2_366_, cactl_vari0_.AD_Org_ID as AD_Org_I3_366_, cactl_vari0_.Isactive as Isactive4_366_, cactl_vari0_.Created as Created5_366_, cactl_vari0_.Createdby as Createdb6_366_, cactl_vari0_.Updated as Updated7_366_, cactl_vari0_.Updatedby as Updatedb8_366_, cactl_vari0_.M_Product_ID as M_Produc9_366_, cactl_vari0_.C_Bpartner_ID as C_Bpart10_366_, cactl_vari0_.C_Uom_ID as C_Uom_I11_366_, cactl_vari0_.Price as Price12_366_, cactl_vari0_.Cactl_Variety_ID as Cactl_V13_366_, cactl_vari0_.Pricelist as Priceli14_366_, cactl_vari0_.Date_From as Date_Fr15_366_, cactl_vari0_.Date_To as Date_To16_366_, cactl_vari0_.Vendorproductno as Vendorp17_366_, cactl_vari0_.Iscurrentvendor as Iscurre18_366_, cactl_vari0_.Isprocessing as Isproce19_366_ from cactl_variety_product cactl_vari0_ left outer join C_BPartner businesspa1_ on cactl_vari0_.C_Bpartner_ID=businesspa1_.C_BPartner_ID left outer join C_UOM uom2_ on cactl_vari0_.C_Uom_ID=uom2_.C_UOM_ID left outer join cactl_variety cactl_vari3_ on cactl_vari0_.Cactl_Variety_ID=cactl_vari3_.Cactl_Variety_ID where (cactl_vari0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8 , $9)) and (cactl_vari0_.AD_Client_ID in ($1 , $2)) and cactl_vari0_.Isactive=$10 order by businesspa1_.Value, businesspa1_.Name, businesspa1_.TaxID, businesspa1_.Name2, uom2_.Name, cactl_vari0_.Price, cactl_vari3_.Name, cactl_vari3_.Value, cactl_vari0_.Cactl_Variety_Product_ID limit $3
d8e19e1efcselect invoice0_.C_Invoice_ID as C_Invoic1_260_, invoice0_.AD_Client_ID as AD_Clien2_260_, invoice0_.AD_Org_ID as AD_Org_I3_260_, invoice0_.IsActive as IsActive4_260_, invoice0_.Created as Created5_260_, invoice0_.CreatedBy as CreatedB6_260_, invoice0_.Updated as Updated7_260_, invoice0_.UpdatedBy as UpdatedB8_260_, invoice0_.IsSOTrx as IsSOTrx9_260_, invoice0_.DocumentNo as Documen10_260_, invoice0_.DocStatus as DocStat11_260_, invoice0_.DocAction as DocActi12_260_, invoice0_.Processing as Process13_260_, invoice0_.Processed as Process14_260_, invoice0_.Posted as Posted15_260_, invoice0_.C_DocType_ID as C_DocTy16_260_, invoice0_.C_DocTypeTarget_ID as C_DocTy17_260_, invoice0_.C_Order_ID as C_Order18_260_, invoice0_.Description as Descrip19_260_, invoice0_.IsPrinted as IsPrint20_260_, invoice0_.SalesRep_ID as SalesRe21_260_, invoice0_.DateInvoiced as DateInv22_260_, invoice0_.DatePrinted as DatePri23_260_, invoice0_.DateAcct as DateAcc24_260_, invoice0_.C_BPartner_ID as C_BPart25_260_, invoice0_.C_BPartner_Location_ID as C_BPart26_260_, invoice0_.POReference as PORefer27_260_, invoice0_.IsDiscountPrinted as IsDisco28_260_, invoice0_.DateOrdered as DateOrd29_260_, invoice0_.C_Currency_ID as C_Curre30_260_, invoice0_.C_PaymentTerm_ID as C_Payme31_260_, invoice0_.C_Charge_ID as C_Charg32_260_, invoice0_.ChargeAmt as ChargeA33_260_, invoice0_.TotalLines as TotalLi34_260_, invoice0_.GrandTotal as GrandTo35_260_, invoice0_.M_PriceList_ID as M_Price36_260_, invoice0_.IsTaxIncluded as IsTaxIn37_260_, invoice0_.C_Campaign_ID as C_Campa38_260_, invoice0_.C_Project_ID as C_Proje39_260_, invoice0_.C_Activity_ID as C_Activ40_260_, invoice0_.CreateFrom as CreateF41_260_, invoice0_.GenerateTo as Generat42_260_, invoice0_.AD_User_ID as AD_User43_260_, invoice0_.CopyFrom as CopyFro44_260_, invoice0_.IsSelfService as IsSelfS45_260_, invoice0_.AD_OrgTrx_ID as AD_OrgT46_260_, invoice0_.User1_ID as User47_260_, invoice0_.User2_ID as User48_260_, invoice0_.Withholdingamount as Withhol49_260_, invoice0_.Taxdate as Taxdate50_260_, invoice0_.C_Withholding_ID as C_Withh51_260_, invoice0_.Ispaid as Ispaid52_260_, invoice0_.EM_Einv_Generated as EM_Einv53_260_, invoice0_.Totalpaid as Totalpa54_260_, invoice0_.EM_Einv_Sent as EM_Einv55_260_, invoice0_.OutstandingAmt as Outstan56_260_, invoice0_.DaysTillDue as DaysTil57_260_, invoice0_.DueAmt as DueAmt58_260_, invoice0_.LastCalculatedOnDate as LastCal59_260_, invoice0_.FIN_Paymentmethod_ID as FIN_Pay60_260_, invoice0_.FIN_Payment_Priority_ID as FIN_Pay61_260_, invoice0_.Finalsettlement as Finalse62_260_, invoice0_.Daysoutstanding as Daysout63_260_, invoice0_.Percentageoverdue as Percent64_260_, invoice0_.C_Costcenter_ID as C_Costc65_260_, invoice0_.Calculate_Promotions as Calcula66_260_, invoice0_.A_Asset_ID as A_Asset67_260_, invoice0_.EM_APRM_Addpayment as EM_APRM68_260_, invoice0_.Iscashvat as Iscashv69_260_, invoice0_.EM_APRM_Processinvoice as EM_APRM70_260_, invoice0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm71_260_, invoice0_.Prepaymentamt as Prepaym72_260_, invoice0_.Createfromorders as Createf73_260_, invoice0_.Createfrominouts as Createf74_260_, invoice0_.EM_Advcrm_Newactivity as EM_Advc75_260_, invoice0_.Paidamtatinvoicing as Paidamt76_260_, invoice0_.EM_Obpos_Rounding_Amount as EM_Obpo77_260_, invoice0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc78_260_, invoice0_.BPartner_ExtRef as BPartne79_260_, invoice0_.EM_Aeatsii_Send as EM_Aeat80_260_, invoice0_.EM_Obpos_Sequencename as EM_Obpo81_260_, invoice0_.EM_Aeatsii_Issent as EM_Aeat82_260_, invoice0_.EM_Obpos_Sequencenumber as EM_Obpo83_260_, invoice0_.EM_Aeatsii_Fecha_Operacion as EM_Aeat84_260_, invoice0_.EM_Aeatsii_Clave_Tipo as EM_Aeat85_260_, invoice0_.EM_Aeatsii_Motivo_Rectif as EM_Aeat86_260_, invoice0_.EM_Prouti_Recalculate_Price as EM_Prou87_260_, invoice0_.EM_Aeatsii_Clave_Tipo_Fc as EM_Aeat88_260_, invoice0_.EM_Ml_Select_Product as EM_Ml_S89_260_, invoice0_.EM_Prouti_Pricecalculatetdate as EM_Prou90_260_, invoice0_.EM_Aeatsii_Tipo_Rectif as EM_Aeat91_260_, invoice0_.EM_Prouti_Totalizations as EM_Prou92_260_, invoice0_.EM_Aeatsii_Dua as EM_Aeat93_260_, invoice0_.EM_Aeatsii_Fecha_Dua as EM_Aeat94_260_, invoice0_.EM_Aeatsii_Estado as EM_Aeat95_260_, invoice0_.EM_Aeatsii_Error_Registral as EM_Aeat96_260_, invoice0_.EM_Aeatsii_Modif as EM_Aeat97_260_, invoice0_.EM_Aeatsii_Modified as EM_Aeat98_260_, invoice0_.EM_Aeatsii_Description_ID as EM_Aeat99_260_, invoice0_.EM_Aeatsii_Descripcion_Sii as EM_Aea100_260_, invoice0_.EM_Aeatsii_Fecha_Reg_Cont as EM_Aea101_260_, invoice0_.EM_Aeatsii_Dup as EM_Aea102_260_, invoice0_.EM_Aeatsii_Error_Code as EM_Aea103_260_, invoice0_.EM_Aeatsii_Error_Msg as EM_Aea104_260_, invoice0_.EM_Aeatsii_Unsubscribe as EM_Aea105_260_, invoice0_.EM_Aeatsii_Pur_Description_ID as EM_Aea106_260_, invoice0_.EM_Aeatsii_Multi_Dua as EM_Aea107_260_, invoice0_.EM_Aeatsii_Ejercicio as EM_Aea108_260_, invoice0_.EM_Aeatsii_Periodo as EM_Aea109_260_, invoice0_.EM_Aeatsii_Autofactura as EM_Aea110_260_, invoice0_.EM_Aeatsii_Invoice_ID as EM_Aea111_260_, invoice0_.EM_Aeatsii_Insiidate as EM_Aea112_260_, invoice0_.EM_Aeatsii_Cause_Exemption_ID as EM_Aea113_260_, invoice0_.EM_Aeatsii_Isauthorization as EM_Aea114_260_, invoice0_.EM_Aeatsii_Authorizationno as EM_Aea115_260_, invoice0_.EM_Priuti_Createpurchinv as EM_Pri116_260_, invoice0_.EM_Priuti_Generated as EM_Pri117_260_, invoice0_.EM_Priuti_Date_Complete as EM_Pri118_260_, invoice0_.EM_Prges_Expediente_ID as EM_Prg119_260_, invoice0_.EM_Priuti_User_Complete_ID as EM_Pri120_260_, invoice0_.EM_Prges_Annotation_ID as EM_Prg121_260_, invoice0_.EM_Prges_Record_Number as EM_Prg122_260_, invoice0_.EM_Priuti_Status_Of_Review as EM_Pri123_260_, invoice0_.EM_Prges_Grantotal as EM_Prg124_260_, invoice0_.EM_Priuti_Validate as EM_Pri125_260_, invoice0_.EM_Priuti_Start_Review as EM_Pri126_260_, invoice0_.EM_Prges_Poreference as EM_Prg127_260_, invoice0_.em_cactl_createfromship as em_cac128_260_ from C_Invoice invoice0_ where invoice0_.IsSOTrx=$43 and invoice0_.DocStatus<>$44 and (invoice0_.Updated>$1 or invoice0_.Processed=$45) and (invoice0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (invoice0_.AD_Client_ID in ($40 , $41)) order by invoice0_.Created desc, invoice0_.C_Invoice_ID desc limit $42
1fbcf388f5select producttrl0_.M_Product_Trl_ID as M_Produc1_524_, producttrl0_.M_Product_ID as M_Produc2_524_, producttrl0_.AD_Language as AD_Langu3_524_, producttrl0_.AD_Client_ID as AD_Clien4_524_, producttrl0_.AD_Org_ID as AD_Org_I5_524_, producttrl0_.IsActive as IsActive6_524_, producttrl0_.Created as Created7_524_, producttrl0_.CreatedBy as CreatedB8_524_, producttrl0_.Updated as Updated9_524_, producttrl0_.UpdatedBy as Updated10_524_, producttrl0_.Name as Name11_524_, producttrl0_.DocumentNote as Documen12_524_, producttrl0_.IsTranslated as IsTrans13_524_ from M_Product_Trl producttrl0_ where producttrl0_.M_Product_ID=$1 and producttrl0_.AD_Language=$2 and producttrl0_.IsActive=$4 limit $3
ac7478aac8select prges_reco0_.Prges_Records_ID as Prges_Re1_831_, prges_reco0_.AD_Client_ID as AD_Clien2_831_, prges_reco0_.AD_Org_ID as AD_Org_I3_831_, prges_reco0_.Created as Created4_831_, prges_reco0_.Createdby as Createdb5_831_, prges_reco0_.Updated as Updated6_831_, prges_reco0_.Updatedby as Updatedb7_831_, prges_reco0_.Isactive as Isactive8_831_, prges_reco0_.Action as Action9_831_, prges_reco0_.Url as Url10_831_, prges_reco0_.Jsoninfo as Jsoninf11_831_, prges_reco0_.Error as Error12_831_, prges_reco0_.Process as Process13_831_, prges_reco0_.Status as Status14_831_, prges_reco0_.C_Invoice_ID as C_Invoi15_831_, prges_reco0_.Prges_Config_ID as Prges_C16_831_ from prges_records prges_reco0_ where prges_reco0_.Prges_Config_ID=$1 and (prges_reco0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (prges_reco0_.AD_Client_ID in ($40 , $41)) order by prges_reco0_.Created desc, prges_reco0_.Prges_Records_ID desc limit $42
ac12b19890SELECT COUNT(*) AS ID FROM Fact_Acct WHERE C_Tax_ID = $1 AND AD_ORG_ID IN ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39) AND AD_CLIENT_ID IN ($40)
5ae9609e2eSELECT COUNT(*) AS ID FROM C_OrderLine WHERE C_Tax_ID = $1 AND EXISTS (SELECT $2 FROM C_Order WHERE C_Order.C_Order_ID = C_OrderLine.C_Order_ID AND EXISTS (SELECT $3 FROM C_BPartner WHERE C_BPartner.C_BPartner_ID = C_Order.C_BPartner_ID AND EXISTS (SELECT $4 FROM C_BPartner WHERE C_BPartner.C_BPartner_ID = C_BPartner.C_BPartner_ID))) AND AD_ORG_ID NOT IN ($5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42)
4aae53f3daSELECT * FROM (select c_order_id AS referencekey_id, ad_column_identifier_std($2, c_order_id) AS record_id, $3 AS ad_role_id, $4 AS ad_user_id, $5 || documentno AS description, $6 AS isActive, $7 AS ad_org_id, ad_client_id AS ad_client_id, now() AS created, $8 AS createdBy, now() AS updated, $9 AS updatedBy from c_order where ( em_prouti_Received <> (coalesce((select case when sum(abs(ol.qtyordered)) = $10 then $11 else trunc(coalesce(sum(abs(coalesce(( select least(coalesce(abs(sum(il.movementqty)), $12), abs(ol.qtyordered)) from m_inoutline il left join m_inout i on i.m_inout_id=il.m_inout_id where i.docstatus<>$13 and il.c_orderline_id=ol.c_orderline_id ),$14))), $15)/sum(abs(ol.qtyordered)) * $16, $17) end from c_orderline ol where ol.c_order_id=c_order.c_order_id and ol.c_order_discount_id is null ),$18)) or em_prouti_Invoiced <> (coalesce(( select case when sum(abs(ol.qtyordered)) = $19 then $20 else round(coalesce(sum(abs(coalesce(( select least(coalesce(abs(sum(il.qtyinvoiced)), $21), abs(ol.qtyordered)) from c_invoiceline il left join c_invoice i on i.c_invoice_id=il.c_invoice_id where i.docstatus<>$22 and il.c_orderline_id=ol.c_orderline_id ),$23))), $24)/sum(abs(ol.qtyordered)) * $25, $26) end from c_orderline ol where ol.c_order_id=c_order.c_order_id and ol.c_order_discount_id is null), $27)) ) and issotrx=$28 and docstatus <> $29) AAA where not exists (select $30 from ad_alert a where a.ad_alertrule_id = $1 and a.referencekey_id = aaa.referencekey_id and coalesce(a.status, $31) != $32)
2ea6727409select sum(invoice0_.GrandTotal) as col_0_0_ from C_Invoice invoice0_ where invoice0_.DateAcct>=$1 and invoice0_.DateAcct<=$2 and invoice0_.DocStatus=$3 and invoice0_.IsSOTrx=$45 and invoice0_.DocStatus<>$46 and (invoice0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41)) and (invoice0_.AD_Client_ID in ($42 , $43)) limit $44
281ee3922aSELECT $2 FROM ONLY "public"."c_order" x WHERE "c_order_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
44ba191660SELECT COUNT(*) AS ID FROM C_OrderLine WHERE C_Tax_ID = $1 AND EXISTS (SELECT $2 FROM C_Order WHERE C_Order.C_Order_ID = C_OrderLine.C_Order_ID AND EXISTS (SELECT $3 FROM C_BPartner WHERE C_BPartner.C_BPartner_ID = C_Order.C_BPartner_ID AND EXISTS (SELECT $4 FROM C_BPartner WHERE C_BPartner.C_BPartner_ID = C_BPartner.C_BPartner_ID))) AND AD_ORG_ID IN ($5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42) AND AD_CLIENT_ID IN ($43)
4a2522fbe3delete from fact_acct where record_id in ( select fin_finacc_transaction_id from fin_finacc_transaction where 1=1 and posted = 'Y' and fin_financial_account_id in ('3BE5D59BFE684624986E4D8BB84F1273', 'C2CD6961C02445E1A0F7979AB62F9990') and paymentamt > 0 and statementdate >= to_date('01-01-2026', 'dd-MM-yyyy'))
1df7427be7select fin_finacc0_.Fin_Finacc_Transaction_ID as Fin_Fina1_388_, fin_finacc0_.AD_Client_ID as AD_Clien2_388_, fin_finacc0_.AD_Org_ID as AD_Org_I3_388_, fin_finacc0_.Created as Created4_388_, fin_finacc0_.Createdby as Createdb5_388_, fin_finacc0_.Updated as Updated6_388_, fin_finacc0_.Updatedby as Updatedb7_388_, fin_finacc0_.Isactive as Isactive8_388_, fin_finacc0_.C_Currency_ID as C_Curren9_388_, fin_finacc0_.Fin_Financial_Account_ID as Fin_Fin10_388_, fin_finacc0_.Line as Line11_388_, fin_finacc0_.Fin_Payment_ID as Fin_Pay12_388_, fin_finacc0_.DateAcct as DateAcc13_388_, fin_finacc0_.C_Glitem_ID as C_Glite14_388_, fin_finacc0_.Status as Status15_388_, fin_finacc0_.Paymentamt as Payment16_388_, fin_finacc0_.Depositamt as Deposit17_388_, fin_finacc0_.Processed as Process18_388_, fin_finacc0_.Processing as Process19_388_, fin_finacc0_.Posted as Posted20_388_, fin_finacc0_.C_Project_ID as C_Proje21_388_, fin_finacc0_.C_Campaign_ID as C_Campa22_388_, fin_finacc0_.C_Activity_ID as C_Activ23_388_, fin_finacc0_.User1_ID as User24_388_, fin_finacc0_.User2_ID as User25_388_, fin_finacc0_.Trxtype as Trxtype26_388_, fin_finacc0_.Statementdate as Stateme27_388_, fin_finacc0_.Description as Descrip28_388_, fin_finacc0_.FIN_Reconciliation_ID as FIN_Rec29_388_, fin_finacc0_.CreatedByAlgorithm as Created30_388_, fin_finacc0_.Foreign_Currency_ID as Foreign31_388_, fin_finacc0_.Foreign_Convert_Rate as Foreign32_388_, fin_finacc0_.Foreign_Amount as Foreign33_388_, fin_finacc0_.C_Bpartner_ID as C_Bpart34_388_, fin_finacc0_.M_Product_ID as M_Produ35_388_, fin_finacc0_.C_Salesregion_ID as C_Sales36_388_, fin_finacc0_.C_Costcenter_ID as C_Costc37_388_, fin_finacc0_.EM_Aprm_Processed as EM_Aprm38_388_, fin_finacc0_.EM_Obpos_App_Cashup_ID as EM_Obpo39_388_, fin_finacc0_.EM_Aprm_Finacc_Trans_Origin as EM_Aprm40_388_ from FIN_Finacc_Transaction fin_finacc0_ where fin_finacc0_.Fin_Financial_Account_ID=$1 and (fin_finacc0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (fin_finacc0_.AD_Client_ID in ($40 , $41)) order by fin_finacc0_.Statementdate desc, fin_finacc0_.Fin_Finacc_Transaction_ID desc limit $42 offset $43
fa5e805d20insert into M_Transaction (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, MovementType, M_Locator_ID, M_Product_ID, MovementDate, MovementQty, M_ProductionLine_ID, M_AttributeSetInstance_ID, C_UOM_ID, TrxProcessDate, IsCostCalculated, Costing_Status, Checkreservedqty, Isprocessed, Checkpricedifference, EM_Prouti_Exported, Manualcostadjustment, IsCostPermanent, M_Transaction_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25)
10410964a2SELECT $2 FROM ONLY "public"."ad_org" x WHERE "ad_org_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
185ba8cb63select f.id, f.hour, CASE WHEN f.reservation_type = $1 AND f.multiplier is not null THEN f.available * f.multiplier ELSE f.available END as available, CASE WHEN f.reservation_type = $2 AND f.multiplier is not null THEN f.reserved * f.multiplier ELSE f.reserved END as reserved, f.slot_type FROM ( select ptd.prpass_timeslots_detail_id as id, to_char(ptd.hour, $3) as hour, coalesce( (select qtyavailable from prpass_timeslots_exceptions pte where pte.prpass_timeslots_id = ptd.prpass_timeslots_id and (ptd.hour is null OR (to_char(pte.hour, $4) = to_char(ptd.hour, $5))) and pte.date = $6::date), CASE WHEN (EXTRACT($7 FROM ($8::timestamp - CURRENT_DATE)) / $9 >= pt.agency_reservation_time) OR (ptd.qtyavailable_agency > $10 AND pt.agency_reservation_time is null) THEN CASE WHEN $11 THEN COALESCE(ptd.qtyavailable_agency, COALESCE(ptd.qtyavailable_online, qtyavailable)) WHEN $12 AND ptd.qtyavailable_online = $13 THEN ptd.qtyavailable_online ELSE (COALESCE(ptd.qtyavailable_online, qtyavailable)) - ptd.qtyavailable_agency END ELSE CASE WHEN pt.slot_type = $14 AND $15 THEN COALESCE(ptd.qtyavailable_online, ptd.qtyavailable) ELSE ptd.qtyavailable END END) as available, coalesce( (select sum( CASE WHEN pt.reservation_type = $16 AND f.cart is not null AND pt.multiplier is not null THEN floor((f.qtyreservation + pt.multiplier - $17) / pt.multiplier) ELSE f.qtyreservation END) from( select count(ppi.prpass_pass_inst_id) as qtyreservation, cart from prpass_timeslots_res ptr left join c_orderline col on col.c_orderline_id = ptr.c_orderline_id left join c_order co on co.c_order_id = col.c_order_id left join prpass_pass_inst ppi on ppi.c_orderline_id = col.c_orderline_id where ptr.prpass_timeslots_detail_id = ptd.prpass_timeslots_detail_id and ptr.date = $18::date and (pt.slot_type <> $19 or (pt.slot_type = $20 and CASE WHEN $21 THEN co.em_obpos_applications_id is null OR ptr.c_orderline_id is null ELSE co.em_obpos_applications_id is not null OR ptr.c_orderline_id is null END)) and (CASE WHEN (EXTRACT($22 FROM (ptr.date - CURRENT_DATE)) / $23 >= pt.agency_reservation_time) OR (ptd.qtyavailable_agency > $24 AND pt.agency_reservation_time is null) THEN CASE WHEN $25 THEN ptr.agency = $26 ELSE ptr.agency = $27 END ELSE $28 END) and cart is not null group by cart ) as f), $29) as reserved, pt.multiplier, pt.reservation_type, pt.slot_type from prpass_timeslots_detail ptd join prpass_timeslots pt on pt.prpass_timeslots_id = ptd.prpass_timeslots_id where ptd.prpass_timeslots_id = $30 order by 2 asc) AS f
7e62f3b264select cactl_vari0_.Cactl_Variety_Product_ID as Cactl_Va1_366_, cactl_vari0_.AD_Client_ID as AD_Clien2_366_, cactl_vari0_.AD_Org_ID as AD_Org_I3_366_, cactl_vari0_.Isactive as Isactive4_366_, cactl_vari0_.Created as Created5_366_, cactl_vari0_.Createdby as Createdb6_366_, cactl_vari0_.Updated as Updated7_366_, cactl_vari0_.Updatedby as Updatedb8_366_, cactl_vari0_.M_Product_ID as M_Produc9_366_, cactl_vari0_.C_Bpartner_ID as C_Bpart10_366_, cactl_vari0_.C_Uom_ID as C_Uom_I11_366_, cactl_vari0_.Price as Price12_366_, cactl_vari0_.Cactl_Variety_ID as Cactl_V13_366_, cactl_vari0_.Pricelist as Priceli14_366_, cactl_vari0_.Date_From as Date_Fr15_366_, cactl_vari0_.Date_To as Date_To16_366_, cactl_vari0_.Vendorproductno as Vendorp17_366_, cactl_vari0_.Iscurrentvendor as Iscurre18_366_, cactl_vari0_.Isprocessing as Isproce19_366_ from cactl_variety_product cactl_vari0_ left outer join C_BPartner businesspa1_ on cactl_vari0_.C_Bpartner_ID=businesspa1_.C_BPartner_ID left outer join C_UOM uom2_ on cactl_vari0_.C_Uom_ID=uom2_.C_UOM_ID left outer join cactl_variety cactl_vari3_ on cactl_vari0_.Cactl_Variety_ID=cactl_vari3_.Cactl_Variety_ID where (cactl_vari0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8 , $9 , $10)) and (cactl_vari0_.AD_Client_ID in ($1 , $2)) and cactl_vari0_.Isactive=$11 order by businesspa1_.Value, businesspa1_.Name, businesspa1_.TaxID, businesspa1_.Name2, uom2_.Name, cactl_vari0_.Price, cactl_vari3_.Name, cactl_vari3_.Value, cactl_vari0_.Cactl_Variety_Product_ID limit $3
8ec2df7b9dselect cactl_vari0_.Cactl_Variety_Product_ID as Cactl_Va1_366_, cactl_vari0_.AD_Client_ID as AD_Clien2_366_, cactl_vari0_.AD_Org_ID as AD_Org_I3_366_, cactl_vari0_.Isactive as Isactive4_366_, cactl_vari0_.Created as Created5_366_, cactl_vari0_.Createdby as Createdb6_366_, cactl_vari0_.Updated as Updated7_366_, cactl_vari0_.Updatedby as Updatedb8_366_, cactl_vari0_.M_Product_ID as M_Produc9_366_, cactl_vari0_.C_Bpartner_ID as C_Bpart10_366_, cactl_vari0_.C_Uom_ID as C_Uom_I11_366_, cactl_vari0_.Price as Price12_366_, cactl_vari0_.Cactl_Variety_ID as Cactl_V13_366_, cactl_vari0_.Pricelist as Priceli14_366_, cactl_vari0_.Date_From as Date_Fr15_366_, cactl_vari0_.Date_To as Date_To16_366_, cactl_vari0_.Vendorproductno as Vendorp17_366_, cactl_vari0_.Iscurrentvendor as Iscurre18_366_, cactl_vari0_.Isprocessing as Isproce19_366_ from cactl_variety_product cactl_vari0_ left outer join C_BPartner businesspa1_ on cactl_vari0_.C_Bpartner_ID=businesspa1_.C_BPartner_ID left outer join C_UOM uom2_ on cactl_vari0_.C_Uom_ID=uom2_.C_UOM_ID left outer join cactl_variety cactl_vari3_ on cactl_vari0_.Cactl_Variety_ID=cactl_vari3_.Cactl_Variety_ID where (cactl_vari0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8)) and (cactl_vari0_.AD_Client_ID in ($1 , $2)) and cactl_vari0_.Isactive=$9 order by businesspa1_.Value, businesspa1_.Name, businesspa1_.TaxID, businesspa1_.Name2, uom2_.Name, cactl_vari0_.Price, cactl_vari3_.Name, cactl_vari3_.Value, cactl_vari0_.Cactl_Variety_Product_ID limit $3
98d4183d4bvacuum analyze C_Import_Entry_Archive
e1739d379dCOPY public.c_invoice (c_invoice_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, issotrx, documentno, docstatus, docaction, processing, processed, posted, c_doctype_id, c_doctypetarget_id, c_order_id, description, isprinted, salesrep_id, dateinvoiced, dateprinted, dateacct, c_bpartner_id, c_bpartner_location_id, poreference, isdiscountprinted, dateordered, c_currency_id, c_paymentterm_id, c_charge_id, chargeamt, totallines, grandtotal, m_pricelist_id, istaxincluded, c_campaign_id, c_project_id, c_activity_id, createfrom, generateto, ad_user_id, copyfrom, isselfservice, ad_orgtrx_id, user1_id, user2_id, withholdingamount, taxdate, c_withholding_id, ispaid, totalpaid, outstandingamt, daystilldue, dueamt, lastcalculatedondate, fin_paymentmethod_id, fin_payment_priority_id, finalsettlement, daysoutstanding, percentageoverdue, c_costcenter_id, calculate_promotions, a_asset_id, iscashvat, prepaymentamt, createfromorders, createfrominouts, em_aprm_addpayment, em_aprm_processinvoice, paidamtatinvoicing, bpartner_extref, em_einv_generated, em_einv_sent, em_aeatsii_send, em_aeatsii_issent, em_aeatsii_fecha_operacion, em_aeatsii_clave_tipo, em_aeatsii_motivo_rectif, em_aeatsii_clave_tipo_fc, em_aeatsii_tipo_rectif, em_aeatsii_dua, em_aeatsii_fecha_dua, em_aeatsii_estado, em_aeatsii_error_registral, em_aeatsii_modif, em_aeatsii_modified, em_aeatsii_description_id, em_aeatsii_descripcion_sii, em_aeatsii_fecha_reg_cont, em_aeatsii_dup, em_aeatsii_error_code, em_aeatsii_error_msg, em_aeatsii_unsubscribe, em_aeatsii_pur_description_id, em_aeatsii_multi_dua, em_aeatsii_ejercicio, em_aeatsii_periodo, em_aeatsii_autofactura, em_aeatsii_invoice_id, em_aeatsii_insiidate, em_aeatsii_cause_exemption_id, em_aeatsii_isauthorization, em_aeatsii_authorizationno, em_obpos_rounding_amount, em_ml_select_product, em_prouti_recalculate_price, em_prouti_pricecalculatetdate, em_prouti_totalizations, em_obcma_c_poc_email_id, em_obpos_sequencename, em_obpos_sequencenumber, em_advcrm_newactivity, em_priuti_createpurchinv, em_priuti_generated, em_priuti_date_complete, em_priuti_user_complete_id, em_priuti_status_of_review, em_priuti_validate, em_priuti_start_review, em_prges_expediente_id, em_prges_annotation_id, em_prges_record_number, em_prges_grantotal, em_sgpcrm_securitygroups_id, em_prges_poreference, em_cactl_createfromship) TO stdout
1b89da5cecBEGIN
b4d6b6665eSELECT * FROM (select inst.prpass_pass_inst_id AS referencekey_id, inst.value AS record_id, $2 AS ad_role_id, $3 AS ad_user_id, $4||inst.value AS description, $5 AS isActive, inst.ad_org_id, inst.ad_client_id, now() AS created, $6 AS createdBy, now() AS updated, $7 AS updatedBy from prpass_pass_inst inst where value IN ( select value from prpass_pass_inst where created >= current_date - $8 group by value having count(value) > $9 )) AAA where not exists (select $10 from ad_alert a where a.ad_alertrule_id = $1 and a.referencekey_id = aaa.referencekey_id and coalesce(a.status, $11) != $12)
67a75a3409COPY public.fact_acct (fact_acct_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, c_acctschema_id, account_id, datetrx, dateacct, c_period_id, ad_table_id, record_id, line_id, gl_category_id, c_tax_id, m_locator_id, postingtype, c_currency_id, amtsourcedr, amtsourcecr, amtacctdr, amtacctcr, c_uom_id, qty, m_product_id, c_bpartner_id, ad_orgtrx_id, c_locfrom_id, c_locto_id, c_salesregion_id, c_project_id, c_campaign_id, c_activity_id, user1_id, user2_id, description, a_asset_id, fact_acct_group_id, seqno, factaccttype, docbasetype, acctvalue, acctdescription, record_id2, c_withholding_id, c_doctype_id, c_costcenter_id, ismodify, datebalanced) TO stdout
2ce9536368vacuum analyze prsync_entry
bde1a48003select sum(invoice0_.GrandTotal) as col_0_0_ from C_Invoice invoice0_ where invoice0_.DateInvoiced>=$1 and invoice0_.DateInvoiced<=$2 and invoice0_.DocStatus=$3 and invoice0_.IsSOTrx=$45 and invoice0_.DocStatus<>$46 and (invoice0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41)) and (invoice0_.AD_Client_ID in ($42 , $43)) limit $44
1ff954bca3SELECT COUNT(*) AS ID FROM C_InvoiceLine WHERE C_Tax_ID = $1 AND EXISTS (SELECT $2 FROM C_Invoice WHERE C_Invoice.C_Invoice_ID = C_InvoiceLine.C_Invoice_ID AND C_Invoice.IsSOTrx=$3) AND AD_ORG_ID IN ($4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41) AND AD_CLIENT_ID IN ($42)
b76ef6c915select order0_.C_Order_ID as C_Order_1_276_, order0_.AD_Client_ID as AD_Clien2_276_, order0_.AD_Org_ID as AD_Org_I3_276_, order0_.IsActive as IsActive4_276_, order0_.Created as Created5_276_, order0_.CreatedBy as CreatedB6_276_, order0_.Updated as Updated7_276_, order0_.UpdatedBy as UpdatedB8_276_, order0_.IsSOTrx as IsSOTrx9_276_, order0_.DocumentNo as Documen10_276_, order0_.DocStatus as DocStat11_276_, order0_.DocAction as DocActi12_276_, order0_.Processing as Process13_276_, order0_.Processed as Process14_276_, order0_.C_DocType_ID as C_DocTy15_276_, order0_.C_DocTypeTarget_ID as C_DocTy16_276_, order0_.Description as Descrip17_276_, order0_.IsDelivered as IsDeliv18_276_, order0_.IsInvoiced as IsInvoi19_276_, order0_.IsPrinted as IsPrint20_276_, order0_.IsSelected as IsSelec21_276_, order0_.SalesRep_ID as SalesRe22_276_, order0_.DateOrdered as DateOrd23_276_, order0_.DatePromised as DatePro24_276_, order0_.DatePrinted as DatePri25_276_, order0_.DateAcct as DateAcc26_276_, order0_.C_BPartner_ID as C_BPart27_276_, order0_.BillTo_ID as BillTo_28_276_, order0_.C_BPartner_Location_ID as C_BPart29_276_, order0_.POReference as PORefer30_276_, order0_.IsDiscountPrinted as IsDisco31_276_, order0_.C_Currency_ID as C_Curre32_276_, order0_.PaymentRule as Payment33_276_, order0_.C_PaymentTerm_ID as C_Payme34_276_, order0_.InvoiceRule as Invoice35_276_, order0_.DeliveryRule as Deliver36_276_, order0_.FreightCostRule as Freight37_276_, order0_.FreightAmt as Freight38_276_, order0_.DeliveryViaRule as Deliver39_276_, order0_.M_Shipper_ID as M_Shipp40_276_, order0_.C_Charge_ID as C_Charg41_276_, order0_.ChargeAmt as ChargeA42_276_, order0_.PriorityRule as Priorit43_276_, order0_.TotalLines as TotalLi44_276_, order0_.GrandTotal as GrandTo45_276_, order0_.M_Warehouse_ID as M_Wareh46_276_, order0_.M_PriceList_ID as M_Price47_276_, order0_.IsTaxIncluded as IsTaxIn48_276_, order0_.C_Campaign_ID as C_Campa49_276_, order0_.C_Project_ID as C_Proje50_276_, order0_.C_Activity_ID as C_Activ51_276_, order0_.Posted as Posted52_276_, order0_.AD_User_ID as AD_User53_276_, order0_.CopyFrom as CopyFro54_276_, order0_.DropShip_BPartner_ID as DropShi55_276_, order0_.DropShip_Location_ID as DropShi56_276_, order0_.DropShip_User_ID as DropShi57_276_, order0_.IsSelfService as IsSelfS58_276_, order0_.AD_OrgTrx_ID as AD_OrgT59_276_, order0_.User1_ID as User60_276_, order0_.User2_ID as User61_276_, order0_.Deliverynotes as Deliver62_276_, order0_.C_Incoterms_ID as C_Incot63_276_, order0_.Incotermsdescription as Incoter64_276_, order0_.Generatetemplate as Generat65_276_, order0_.Delivery_Location_ID as Deliver66_276_, order0_.CopyFromPO as CopyFro67_276_, order0_.FIN_Paymentmethod_ID as FIN_Pay68_276_, order0_.FIN_Payment_Priority_ID as FIN_Pay69_276_, order0_.RM_PickFromShipment as RM_Pick70_276_, order0_.RM_ReceiveMaterials as RM_Rece71_276_, order0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm72_276_, order0_.RM_CreateInvoice as RM_Crea73_276_, order0_.C_Return_Reason_ID as C_Retur74_276_, order0_.RM_AddOrphanLine as RM_AddO75_276_, order0_.A_Asset_ID as A_Asset76_276_, order0_.Calculate_Promotions as Calcula77_276_, order0_.C_Costcenter_ID as C_Costc78_276_, order0_.Convertquotation as Convert79_276_, order0_.C_Reject_Reason_ID as C_Rejec80_276_, order0_.validuntil as validun81_276_, order0_.Quotation_ID as Quotati82_276_, order0_.SO_Res_Status as SO_Res_83_276_, order0_.Create_POLines as Create_84_276_, order0_.EM_Obdisc_Addpack as EM_Obdi85_276_, order0_.Iscashvat as Iscashv86_276_, order0_.EM_OBMFM_Selectfreight as EM_OBMF87_276_, order0_.EM_OBMFM_Delivery_Period_ID as EM_OBMF88_276_, order0_.RM_Pickfromreceipt as RM_Pick89_276_, order0_.Cancelandreplace as Cancela90_276_, order0_.EM_Advcrm_Newactivity as EM_Advc91_276_, order0_.EM_APRM_AddPayment as EM_APRM92_276_, order0_.EM_OBMFM_Delivery_Charges as EM_OBMF93_276_, order0_.EM_OBMFM_Freight_ID as EM_OBMF94_276_, order0_.EM_Obwpl_Generatepicking as EM_Obwp95_276_, order0_.EM_Advcrm_Opportunity_ID as EM_Advc96_276_, order0_.EM_OBMFM_Weight as EM_OBMF97_276_, order0_.EM_Obwpl_Isinpickinglist as EM_Obwp98_276_, order0_.EM_Rcinv_Contractdate as EM_Rcin99_276_, order0_.EM_Obwpl_Readypl as EM_Obw100_276_, order0_.EM_Rcinv_Initialdate as EM_Rci101_276_, order0_.EM_Rcinv_Enddate as EM_Rci102_276_, order0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_276_, order0_.EM_OBMFM_Weight_Uom_ID as EM_OBM104_276_, order0_.EM_Rcinv_Frequency as EM_Rci105_276_, order0_.EM_OBMFM_Set_Weight as EM_OBM106_276_, order0_.EM_Rcinv_Renewautomatically as EM_Rci107_276_, order0_.EM_Aeatsii_Fecha_Operacion as EM_Aea108_276_, order0_.EM_Ml_Select_Product as EM_Ml_109_276_, order0_.EM_Rcinv_Renovationtimes as EM_Rci110_276_, order0_.Confirmcancelandreplace as Confir111_276_, order0_.EM_Aeatsii_Descripcion_Sii as EM_Aea112_276_, order0_.EM_Obpos_Applications_ID as EM_Obp113_276_, order0_.EM_Rcinv_Freqrenovationtime as EM_Rci114_276_, order0_.EM_Obpos_Sendemail as EM_Obp115_276_, order0_.EM_Rcinv_Ordercontract_ID as EM_Rci116_276_, order0_.EM_Obpos_Email_Status as EM_Obp117_276_, order0_.EM_Rcinv_Freqtime as EM_Rci118_276_, order0_.Cancelledorder_id as Cancel119_276_, order0_.EM_Obpos_App_Cashup_ID as EM_Obp120_276_, order0_.EM_Obpos_Createdabsolute as EM_Obp121_276_, order0_.Replacedorder_id as Replac122_276_, order0_.EM_OBPOS_NotInvoiceOnCashUp as EM_OBP123_276_, order0_.EM_Obpos_Rejected_Quotat_ID as EM_Obp124_276_, order0_.EM_Obpos_Isdeleted as EM_Obp125_276_, order0_.Iscancelled as Iscanc126_276_, order0_.EM_Obpos_Islayaway as EM_Obp127_276_, order0_.EM_Obpos_Prepaymentamt as EM_Obp128_276_, order0_.Replacementorder_ID as Replac129_276_, order0_.EM_Obpos_Prepaymentlimitamt as EM_Obp130_276_, order0_.EM_Obpos_Prepaymentlaylimitamt as EM_Obp131_276_, order0_.EM_Obpos_Rounding_Amount as EM_Obp132_276_, order0_.BPartner_ExtRef as BPartn133_276_, order0_.EM_Obpos_Sequencename as EM_Obp134_276_, order0_.EM_Prqc_Clauses_Selector as EM_Prq135_276_, order0_.EM_Obpos_Sequencenumber as EM_Obp136_276_, order0_.EM_Rcinv_Cancelcontract as EM_Rci137_276_, order0_.EM_Rcinv_Cancelleddate as EM_Rci138_276_, order0_.EM_Rcinv_Iscancelled as EM_Rci139_276_, order0_.EM_Psat_Activity_ID as EM_Psa140_276_, order0_.EM_OBSMAIL_EmailAddress as EM_OBS141_276_, order0_.EM_Prouti_Order_Stock as EM_Pro142_276_, order0_.EM_Prouti_Pregenerate_Minout as EM_Pro143_276_, order0_.EM_Prouti_Sotopo as EM_Pro144_276_, order0_.EM_Prouti_Generate_Pick_Inv as EM_Pro145_276_, order0_.EM_Pricm_Order_ID as EM_Pri146_276_, order0_.EM_Prouti_Order_ID as EM_Pro147_276_, order0_.EM_Prouti_Grandtotalinitial as EM_Pro148_276_, order0_.EM_Prouti_Dateclosed as EM_Pro149_276_, order0_.EM_Prouti_Totallinesinitial as EM_Pro150_276_, order0_.EM_Prouti_Changebpartner as EM_Pro151_276_, order0_.EM_Prouti_Recalculate_Price as EM_Pro152_276_, order0_.em_prqr_execute as em_prq153_276_, order0_.EM_Prouti_Pricecalculatetdate as EM_Pro154_276_, order0_.EM_Prqr_Execute_Purchase as EM_Prq155_276_, order0_.EM_Prouti_Reactiveorder as EM_Pro156_276_, order0_.EM_Prqr_Return_Select_Prod as EM_Prq157_276_, order0_.EM_Prouti_Totalizations as EM_Pro158_276_, order0_.em_prouti_Invoiced as em_pro159_276_, order0_.em_prouti_Received as em_pro160_276_, order0_.em_prouti_initial_received as em_pro161_276_, order0_.EM_Prouti_Status_Of_Review as EM_Pro162_276_, order0_.EM_Prouti_Validate_Order as EM_Pro163_276_, order0_.EM_Prouti_Start_Review as EM_Pro164_276_, order0_.EM_Ml_Select_Product_Byattrib as EM_Ml_165_276_, order0_.EM_Prres_Reservation_ID as EM_Prr166_276_, order0_.EM_Prres_Responsible_ID as EM_Prr167_276_, order0_.EM_Prres_Diners as EM_Prr168_276_, order0_.EM_Prres_Sended as EM_Prr169_276_, order0_.EM_Prres_Printed as EM_Prr170_276_, order0_.EM_Prouti_Initial_Bp_ID as EM_Pro171_276_, order0_.EM_Prouti_Addlines_Btn as EM_Pro172_276_, order0_.EM_Prtoma_Tomaticket_ID as EM_Prt173_276_, order0_.EM_Cactl_IsCopy as EM_Cac174_276_, order0_.EM_Prtoma_Jsonorder as EM_Prt175_276_, order0_.EM_Prres_Paid_On_Credit as EM_Prr176_276_, order0_.EM_Prtoma_Grossamount as EM_Prt177_276_, order0_.EM_Cactl_Internal_Notes_Group as EM_Cac178_276_, order0_.EM_Prouti_Changebpartner_Bgt as EM_Pro179_276_, order0_.EM_Prrgr_Locator_ID as EM_Prr180_276_, order0_.EM_Paytef_Transactionreference as EM_Pay181_276_, order0_.EM_Cactl_Indirect_Cost_ID as EM_Cac182_276_, order0_.EM_Cactl_Calculate_Cost as EM_Cac183_276_, order0_.EM_Cactl_Totalcost as EM_Cac184_276_, order0_.EM_Cactl_Forceselectedproject as EM_Cac185_276_, order0_.EM_Cactl_Verified_Return as EM_Cac186_276_, order0_.EM_Cactl_Duplicate_Budget as EM_Cac187_276_, order0_.EM_Prres_Orig_Order_ID as EM_Prr188_276_, order0_.EM_Prcpr_Is_Cloned as EM_Prc189_276_, order0_.EM_Prouti_Select_Soline as EM_Pro190_276_, order0_.EM_Prouti_Return_Quantity as EM_Pro191_276_, order0_.EM_Prqr_Executecredit as EM_Prq192_276_, order0_.Em_Prqr_Credit_Purchase_ID as Em_Prq193_276_ from C_Order order0_ where (upper((order0_.DocumentNo||$3||coalesce(to_char(order0_.DateOrdered), $4)||$5||coalesce(to_char(order0_.GrandTotal), $6))) like upper($1) escape $7) and (exists (select $8 from M_InOut materialmg1_ inner join C_Order order2_ on materialmg1_.C_Order_ID=order2_.C_Order_ID cross join C_DocType documentty3_ where materialmg1_.C_DocType_ID=documentty3_.C_DocType_ID and (materialmg1_.MovementType in ($9 , $10)) and materialmg1_.Islogistic=$11 and documentty3_.IsReturn=$12 and order2_.C_Order_ID=order0_.C_Order_ID and (materialmg1_.AD_Org_ID in ($13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41 , $42 , $43 , $44 , $45 , $46 , $47 , $48 , $49 , $50)) and (materialmg1_.AD_Client_ID in ($51 , $52)))) order by order0_.DocumentNo, order0_.DateOrdered, order0_.GrandTotal limit $2
03d9123317select order0_.C_Order_ID as C_Order_1_276_, order0_.AD_Client_ID as AD_Clien2_276_, order0_.AD_Org_ID as AD_Org_I3_276_, order0_.IsActive as IsActive4_276_, order0_.Created as Created5_276_, order0_.CreatedBy as CreatedB6_276_, order0_.Updated as Updated7_276_, order0_.UpdatedBy as UpdatedB8_276_, order0_.IsSOTrx as IsSOTrx9_276_, order0_.DocumentNo as Documen10_276_, order0_.DocStatus as DocStat11_276_, order0_.DocAction as DocActi12_276_, order0_.Processing as Process13_276_, order0_.Processed as Process14_276_, order0_.C_DocType_ID as C_DocTy15_276_, order0_.C_DocTypeTarget_ID as C_DocTy16_276_, order0_.Description as Descrip17_276_, order0_.IsDelivered as IsDeliv18_276_, order0_.IsInvoiced as IsInvoi19_276_, order0_.IsPrinted as IsPrint20_276_, order0_.IsSelected as IsSelec21_276_, order0_.SalesRep_ID as SalesRe22_276_, order0_.DateOrdered as DateOrd23_276_, order0_.DatePromised as DatePro24_276_, order0_.DatePrinted as DatePri25_276_, order0_.DateAcct as DateAcc26_276_, order0_.C_BPartner_ID as C_BPart27_276_, order0_.BillTo_ID as BillTo_28_276_, order0_.C_BPartner_Location_ID as C_BPart29_276_, order0_.POReference as PORefer30_276_, order0_.IsDiscountPrinted as IsDisco31_276_, order0_.C_Currency_ID as C_Curre32_276_, order0_.PaymentRule as Payment33_276_, order0_.C_PaymentTerm_ID as C_Payme34_276_, order0_.InvoiceRule as Invoice35_276_, order0_.DeliveryRule as Deliver36_276_, order0_.FreightCostRule as Freight37_276_, order0_.FreightAmt as Freight38_276_, order0_.DeliveryViaRule as Deliver39_276_, order0_.M_Shipper_ID as M_Shipp40_276_, order0_.C_Charge_ID as C_Charg41_276_, order0_.ChargeAmt as ChargeA42_276_, order0_.PriorityRule as Priorit43_276_, order0_.TotalLines as TotalLi44_276_, order0_.GrandTotal as GrandTo45_276_, order0_.M_Warehouse_ID as M_Wareh46_276_, order0_.M_PriceList_ID as M_Price47_276_, order0_.IsTaxIncluded as IsTaxIn48_276_, order0_.C_Campaign_ID as C_Campa49_276_, order0_.C_Project_ID as C_Proje50_276_, order0_.C_Activity_ID as C_Activ51_276_, order0_.Posted as Posted52_276_, order0_.AD_User_ID as AD_User53_276_, order0_.CopyFrom as CopyFro54_276_, order0_.DropShip_BPartner_ID as DropShi55_276_, order0_.DropShip_Location_ID as DropShi56_276_, order0_.DropShip_User_ID as DropShi57_276_, order0_.IsSelfService as IsSelfS58_276_, order0_.AD_OrgTrx_ID as AD_OrgT59_276_, order0_.User1_ID as User60_276_, order0_.User2_ID as User61_276_, order0_.Deliverynotes as Deliver62_276_, order0_.C_Incoterms_ID as C_Incot63_276_, order0_.Incotermsdescription as Incoter64_276_, order0_.Generatetemplate as Generat65_276_, order0_.Delivery_Location_ID as Deliver66_276_, order0_.CopyFromPO as CopyFro67_276_, order0_.FIN_Paymentmethod_ID as FIN_Pay68_276_, order0_.FIN_Payment_Priority_ID as FIN_Pay69_276_, order0_.RM_PickFromShipment as RM_Pick70_276_, order0_.RM_ReceiveMaterials as RM_Rece71_276_, order0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm72_276_, order0_.RM_CreateInvoice as RM_Crea73_276_, order0_.C_Return_Reason_ID as C_Retur74_276_, order0_.RM_AddOrphanLine as RM_AddO75_276_, order0_.A_Asset_ID as A_Asset76_276_, order0_.Calculate_Promotions as Calcula77_276_, order0_.C_Costcenter_ID as C_Costc78_276_, order0_.Convertquotation as Convert79_276_, order0_.C_Reject_Reason_ID as C_Rejec80_276_, order0_.validuntil as validun81_276_, order0_.Quotation_ID as Quotati82_276_, order0_.SO_Res_Status as SO_Res_83_276_, order0_.Create_POLines as Create_84_276_, order0_.EM_Obdisc_Addpack as EM_Obdi85_276_, order0_.Iscashvat as Iscashv86_276_, order0_.EM_OBMFM_Selectfreight as EM_OBMF87_276_, order0_.EM_OBMFM_Delivery_Period_ID as EM_OBMF88_276_, order0_.RM_Pickfromreceipt as RM_Pick89_276_, order0_.Cancelandreplace as Cancela90_276_, order0_.EM_Advcrm_Newactivity as EM_Advc91_276_, order0_.EM_APRM_AddPayment as EM_APRM92_276_, order0_.EM_OBMFM_Delivery_Charges as EM_OBMF93_276_, order0_.EM_OBMFM_Freight_ID as EM_OBMF94_276_, order0_.EM_Obwpl_Generatepicking as EM_Obwp95_276_, order0_.EM_Advcrm_Opportunity_ID as EM_Advc96_276_, order0_.EM_OBMFM_Weight as EM_OBMF97_276_, order0_.EM_Obwpl_Isinpickinglist as EM_Obwp98_276_, order0_.EM_Rcinv_Contractdate as EM_Rcin99_276_, order0_.EM_Obwpl_Readypl as EM_Obw100_276_, order0_.EM_Rcinv_Initialdate as EM_Rci101_276_, order0_.EM_Rcinv_Enddate as EM_Rci102_276_, order0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_276_, order0_.EM_OBMFM_Weight_Uom_ID as EM_OBM104_276_, order0_.EM_Rcinv_Frequency as EM_Rci105_276_, order0_.EM_OBMFM_Set_Weight as EM_OBM106_276_, order0_.EM_Rcinv_Renewautomatically as EM_Rci107_276_, order0_.EM_Aeatsii_Fecha_Operacion as EM_Aea108_276_, order0_.EM_Ml_Select_Product as EM_Ml_109_276_, order0_.EM_Rcinv_Renovationtimes as EM_Rci110_276_, order0_.Confirmcancelandreplace as Confir111_276_, order0_.EM_Aeatsii_Descripcion_Sii as EM_Aea112_276_, order0_.EM_Obpos_Applications_ID as EM_Obp113_276_, order0_.EM_Rcinv_Freqrenovationtime as EM_Rci114_276_, order0_.EM_Obpos_Sendemail as EM_Obp115_276_, order0_.EM_Rcinv_Ordercontract_ID as EM_Rci116_276_, order0_.EM_Obpos_Email_Status as EM_Obp117_276_, order0_.EM_Rcinv_Freqtime as EM_Rci118_276_, order0_.Cancelledorder_id as Cancel119_276_, order0_.EM_Obpos_App_Cashup_ID as EM_Obp120_276_, order0_.EM_Obpos_Createdabsolute as EM_Obp121_276_, order0_.Replacedorder_id as Replac122_276_, order0_.EM_OBPOS_NotInvoiceOnCashUp as EM_OBP123_276_, order0_.EM_Obpos_Rejected_Quotat_ID as EM_Obp124_276_, order0_.EM_Obpos_Isdeleted as EM_Obp125_276_, order0_.Iscancelled as Iscanc126_276_, order0_.EM_Obpos_Islayaway as EM_Obp127_276_, order0_.EM_Obpos_Prepaymentamt as EM_Obp128_276_, order0_.Replacementorder_ID as Replac129_276_, order0_.EM_Obpos_Prepaymentlimitamt as EM_Obp130_276_, order0_.EM_Obpos_Prepaymentlaylimitamt as EM_Obp131_276_, order0_.EM_Obpos_Rounding_Amount as EM_Obp132_276_, order0_.BPartner_ExtRef as BPartn133_276_, order0_.EM_Obpos_Sequencename as EM_Obp134_276_, order0_.EM_Prqc_Clauses_Selector as EM_Prq135_276_, order0_.EM_Obpos_Sequencenumber as EM_Obp136_276_, order0_.EM_Rcinv_Cancelcontract as EM_Rci137_276_, order0_.EM_Rcinv_Cancelleddate as EM_Rci138_276_, order0_.EM_Rcinv_Iscancelled as EM_Rci139_276_, order0_.EM_Psat_Activity_ID as EM_Psa140_276_, order0_.EM_OBSMAIL_EmailAddress as EM_OBS141_276_, order0_.EM_Prouti_Order_Stock as EM_Pro142_276_, order0_.EM_Prouti_Pregenerate_Minout as EM_Pro143_276_, order0_.EM_Prouti_Sotopo as EM_Pro144_276_, order0_.EM_Prouti_Generate_Pick_Inv as EM_Pro145_276_, order0_.EM_Pricm_Order_ID as EM_Pri146_276_, order0_.EM_Prouti_Order_ID as EM_Pro147_276_, order0_.EM_Prouti_Grandtotalinitial as EM_Pro148_276_, order0_.EM_Prouti_Dateclosed as EM_Pro149_276_, order0_.EM_Prouti_Totallinesinitial as EM_Pro150_276_, order0_.EM_Prouti_Changebpartner as EM_Pro151_276_, order0_.EM_Prouti_Recalculate_Price as EM_Pro152_276_, order0_.em_prqr_execute as em_prq153_276_, order0_.EM_Prouti_Pricecalculatetdate as EM_Pro154_276_, order0_.EM_Prqr_Execute_Purchase as EM_Prq155_276_, order0_.EM_Prouti_Reactiveorder as EM_Pro156_276_, order0_.EM_Prqr_Return_Select_Prod as EM_Prq157_276_, order0_.EM_Prouti_Totalizations as EM_Pro158_276_, order0_.em_prouti_Invoiced as em_pro159_276_, order0_.em_prouti_Received as em_pro160_276_, order0_.em_prouti_initial_received as em_pro161_276_, order0_.EM_Prouti_Status_Of_Review as EM_Pro162_276_, order0_.EM_Prouti_Validate_Order as EM_Pro163_276_, order0_.EM_Prouti_Start_Review as EM_Pro164_276_, order0_.EM_Ml_Select_Product_Byattrib as EM_Ml_165_276_, order0_.EM_Prres_Reservation_ID as EM_Prr166_276_, order0_.EM_Prres_Responsible_ID as EM_Prr167_276_, order0_.EM_Prres_Diners as EM_Prr168_276_, order0_.EM_Prres_Sended as EM_Prr169_276_, order0_.EM_Prres_Printed as EM_Prr170_276_, order0_.EM_Prouti_Initial_Bp_ID as EM_Pro171_276_, order0_.EM_Prouti_Addlines_Btn as EM_Pro172_276_, order0_.EM_Prtoma_Tomaticket_ID as EM_Prt173_276_, order0_.EM_Cactl_IsCopy as EM_Cac174_276_, order0_.EM_Prtoma_Jsonorder as EM_Prt175_276_, order0_.EM_Prres_Paid_On_Credit as EM_Prr176_276_, order0_.EM_Prtoma_Grossamount as EM_Prt177_276_, order0_.EM_Cactl_Internal_Notes_Group as EM_Cac178_276_, order0_.EM_Prouti_Changebpartner_Bgt as EM_Pro179_276_, order0_.EM_Prrgr_Locator_ID as EM_Prr180_276_, order0_.EM_Paytef_Transactionreference as EM_Pay181_276_, order0_.EM_Cactl_Indirect_Cost_ID as EM_Cac182_276_, order0_.EM_Cactl_Calculate_Cost as EM_Cac183_276_, order0_.EM_Cactl_Totalcost as EM_Cac184_276_, order0_.EM_Cactl_Forceselectedproject as EM_Cac185_276_, order0_.EM_Cactl_Verified_Return as EM_Cac186_276_, order0_.EM_Cactl_Duplicate_Budget as EM_Cac187_276_, order0_.EM_Prres_Orig_Order_ID as EM_Prr188_276_, order0_.EM_Prcpr_Is_Cloned as EM_Prc189_276_, order0_.EM_Prouti_Select_Soline as EM_Pro190_276_, order0_.EM_Prouti_Return_Quantity as EM_Pro191_276_, order0_.EM_Prqr_Executecredit as EM_Prq192_276_, order0_.Em_Prqr_Credit_Purchase_ID as Em_Prq193_276_ from C_Order order0_ cross join C_DocType documentty1_ where order0_.C_DocTypeTarget_ID=documentty1_.C_DocType_ID and order0_.IsSOTrx=$43 and documentty1_.IsReturn=$44 and (order0_.Updated>$1 or order0_.Processed=$45) and (order0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (order0_.AD_Client_ID in ($40 , $41)) order by order0_.DateOrdered desc, order0_.C_Order_ID desc limit $42
9918228dbaselect prges_conf0_.Prges_Config_ID as Prges_Co1_830_1_, prges_conf0_.AD_Client_ID as AD_Clien2_830_1_, prges_conf0_.AD_Org_ID as AD_Org_I3_830_1_, prges_conf0_.Created as Created4_830_1_, prges_conf0_.Createdby as Createdb5_830_1_, prges_conf0_.Updated as Updated6_830_1_, prges_conf0_.Updatedby as Updatedb7_830_1_, prges_conf0_.Isactive as Isactive8_830_1_, prges_conf0_.Url as Url9_830_1_, prges_conf0_.Token as Token10_830_1_, prges_conf0_.C_Doctype_ID as C_Docty11_830_1_, prges_conf0_.Hold_Seconds as Hold_Se12_830_1_, prges_conf0_.Addon as Addon13_830_1_, prgesrecor1_.Prges_Config_ID as Prges_C16_831_3_, prgesrecor1_.Prges_Records_ID as Prges_Re1_831_3_, prgesrecor1_.Prges_Records_ID as Prges_Re1_831_0_, prgesrecor1_.AD_Client_ID as AD_Clien2_831_0_, prgesrecor1_.AD_Org_ID as AD_Org_I3_831_0_, prgesrecor1_.Created as Created4_831_0_, prgesrecor1_.Createdby as Createdb5_831_0_, prgesrecor1_.Updated as Updated6_831_0_, prgesrecor1_.Updatedby as Updatedb7_831_0_, prgesrecor1_.Isactive as Isactive8_831_0_, prgesrecor1_.Action as Action9_831_0_, prgesrecor1_.Url as Url10_831_0_, prgesrecor1_.Jsoninfo as Jsoninf11_831_0_, prgesrecor1_.Error as Error12_831_0_, prgesrecor1_.Process as Process13_831_0_, prgesrecor1_.Status as Status14_831_0_, prgesrecor1_.C_Invoice_ID as C_Invoi15_831_0_, prgesrecor1_.Prges_Config_ID as Prges_C16_831_0_ from prges_config prges_conf0_ left outer join prges_records prgesrecor1_ on prges_conf0_.Prges_Config_ID=prgesrecor1_.Prges_Config_ID where prges_conf0_.Prges_Config_ID=$1
1b416379eainsert into M_InOutLine (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, Line, Description, M_InOut_ID, C_OrderLine_ID, M_Locator_ID, M_Product_ID, C_UOM_ID, MovementQty, IsInvoiced, IsDescription, Manage_Prereservation, C_Bpartner_ID, Explode, EM_Obwpl_Editlines_Pe, EM_Obwpl_Removeline, EM_Pruti_Voidlines, EM_Pruti_Isvoid, M_InOutLine_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25)
7006b96539WITH orders AS ( SELECT SUM(ol.qtyordered) AS total FROM c_orderline ol JOIN c_order o ON o.c_order_id = ol.c_order_id WHERE ol.m_product_id = p_product AND o.ad_org_id = p_org AND o.issotrx = $6 AND o.dateordered BETWEEN current_date - v_days_consum AND current_date - $7 ), production AS ( SELECT SUM(pl.movementqty) AS total FROM m_productionline pl JOIN m_productionplan pp ON pp.m_productionplan_id = pl.m_productionplan_id JOIN m_production p ON p.m_production_id = pp.m_production_id WHERE pl.m_product_id = p_product AND pl.ad_org_id = p_org AND p.movementdate BETWEEN current_date - v_days_consum AND current_date - $8 ) SELECT COALESCE(orders.total, $9) + COALESCE(production.total, $10) FROM orders, production
d545a87b3dupdate C_Invoice set Updated=$1, LastCalculatedOnDate=$2 where C_Invoice_ID=$3
ff35139986SELECT * FROM C_Order_Post($1)
ab6445a3b6select this_.AD_TreeNode_ID as AD_TreeN1_125_0_, this_.AD_Tree_ID as AD_Tree_2_125_0_, this_.Node_ID as Node_ID3_125_0_, this_.AD_Client_ID as AD_Clien4_125_0_, this_.AD_Org_ID as AD_Org_I5_125_0_, this_.IsActive as IsActive6_125_0_, this_.Created as Created7_125_0_, this_.CreatedBy as CreatedB8_125_0_, this_.Updated as Updated9_125_0_, this_.UpdatedBy as Updated10_125_0_, this_.Parent_ID as Parent_11_125_0_, this_.SeqNo as SeqNo12_125_0_ from AD_TreeNode this_ where this_.Node_ID=$1 and this_.Parent_ID<>$2 and this_.IsActive=$3
d3471812deselect invoice0_.C_Invoice_ID as C_Invoic1_260_, invoice0_.AD_Client_ID as AD_Clien2_260_, invoice0_.AD_Org_ID as AD_Org_I3_260_, invoice0_.IsActive as IsActive4_260_, invoice0_.Created as Created5_260_, invoice0_.CreatedBy as CreatedB6_260_, invoice0_.Updated as Updated7_260_, invoice0_.UpdatedBy as UpdatedB8_260_, invoice0_.IsSOTrx as IsSOTrx9_260_, invoice0_.DocumentNo as Documen10_260_, invoice0_.DocStatus as DocStat11_260_, invoice0_.DocAction as DocActi12_260_, invoice0_.Processing as Process13_260_, invoice0_.Processed as Process14_260_, invoice0_.Posted as Posted15_260_, invoice0_.C_DocType_ID as C_DocTy16_260_, invoice0_.C_DocTypeTarget_ID as C_DocTy17_260_, invoice0_.C_Order_ID as C_Order18_260_, invoice0_.Description as Descrip19_260_, invoice0_.IsPrinted as IsPrint20_260_, invoice0_.SalesRep_ID as SalesRe21_260_, invoice0_.DateInvoiced as DateInv22_260_, invoice0_.DatePrinted as DatePri23_260_, invoice0_.DateAcct as DateAcc24_260_, invoice0_.C_BPartner_ID as C_BPart25_260_, invoice0_.C_BPartner_Location_ID as C_BPart26_260_, invoice0_.POReference as PORefer27_260_, invoice0_.IsDiscountPrinted as IsDisco28_260_, invoice0_.DateOrdered as DateOrd29_260_, invoice0_.C_Currency_ID as C_Curre30_260_, invoice0_.C_PaymentTerm_ID as C_Payme31_260_, invoice0_.C_Charge_ID as C_Charg32_260_, invoice0_.ChargeAmt as ChargeA33_260_, invoice0_.TotalLines as TotalLi34_260_, invoice0_.GrandTotal as GrandTo35_260_, invoice0_.M_PriceList_ID as M_Price36_260_, invoice0_.IsTaxIncluded as IsTaxIn37_260_, invoice0_.C_Campaign_ID as C_Campa38_260_, invoice0_.C_Project_ID as C_Proje39_260_, invoice0_.C_Activity_ID as C_Activ40_260_, invoice0_.CreateFrom as CreateF41_260_, invoice0_.GenerateTo as Generat42_260_, invoice0_.AD_User_ID as AD_User43_260_, invoice0_.CopyFrom as CopyFro44_260_, invoice0_.IsSelfService as IsSelfS45_260_, invoice0_.AD_OrgTrx_ID as AD_OrgT46_260_, invoice0_.User1_ID as User47_260_, invoice0_.User2_ID as User48_260_, invoice0_.Withholdingamount as Withhol49_260_, invoice0_.Taxdate as Taxdate50_260_, invoice0_.C_Withholding_ID as C_Withh51_260_, invoice0_.Ispaid as Ispaid52_260_, invoice0_.EM_Einv_Generated as EM_Einv53_260_, invoice0_.Totalpaid as Totalpa54_260_, invoice0_.EM_Einv_Sent as EM_Einv55_260_, invoice0_.OutstandingAmt as Outstan56_260_, invoice0_.DaysTillDue as DaysTil57_260_, invoice0_.DueAmt as DueAmt58_260_, invoice0_.LastCalculatedOnDate as LastCal59_260_, invoice0_.FIN_Paymentmethod_ID as FIN_Pay60_260_, invoice0_.FIN_Payment_Priority_ID as FIN_Pay61_260_, invoice0_.Finalsettlement as Finalse62_260_, invoice0_.Daysoutstanding as Daysout63_260_, invoice0_.Percentageoverdue as Percent64_260_, invoice0_.C_Costcenter_ID as C_Costc65_260_, invoice0_.Calculate_Promotions as Calcula66_260_, invoice0_.A_Asset_ID as A_Asset67_260_, invoice0_.EM_APRM_Addpayment as EM_APRM68_260_, invoice0_.Iscashvat as Iscashv69_260_, invoice0_.EM_APRM_Processinvoice as EM_APRM70_260_, invoice0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm71_260_, invoice0_.Prepaymentamt as Prepaym72_260_, invoice0_.Createfromorders as Createf73_260_, invoice0_.Createfrominouts as Createf74_260_, invoice0_.EM_Advcrm_Newactivity as EM_Advc75_260_, invoice0_.Paidamtatinvoicing as Paidamt76_260_, invoice0_.EM_Obpos_Rounding_Amount as EM_Obpo77_260_, invoice0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc78_260_, invoice0_.BPartner_ExtRef as BPartne79_260_, invoice0_.EM_Aeatsii_Send as EM_Aeat80_260_, invoice0_.EM_Obpos_Sequencename as EM_Obpo81_260_, invoice0_.EM_Aeatsii_Issent as EM_Aeat82_260_, invoice0_.EM_Obpos_Sequencenumber as EM_Obpo83_260_, invoice0_.EM_Aeatsii_Fecha_Operacion as EM_Aeat84_260_, invoice0_.EM_Aeatsii_Clave_Tipo as EM_Aeat85_260_, invoice0_.EM_Aeatsii_Motivo_Rectif as EM_Aeat86_260_, invoice0_.EM_Prouti_Recalculate_Price as EM_Prou87_260_, invoice0_.EM_Aeatsii_Clave_Tipo_Fc as EM_Aeat88_260_, invoice0_.EM_Ml_Select_Product as EM_Ml_S89_260_, invoice0_.EM_Prouti_Pricecalculatetdate as EM_Prou90_260_, invoice0_.EM_Aeatsii_Tipo_Rectif as EM_Aeat91_260_, invoice0_.EM_Prouti_Totalizations as EM_Prou92_260_, invoice0_.EM_Aeatsii_Dua as EM_Aeat93_260_, invoice0_.EM_Aeatsii_Fecha_Dua as EM_Aeat94_260_, invoice0_.EM_Aeatsii_Estado as EM_Aeat95_260_, invoice0_.EM_Aeatsii_Error_Registral as EM_Aeat96_260_, invoice0_.EM_Aeatsii_Modif as EM_Aeat97_260_, invoice0_.EM_Aeatsii_Modified as EM_Aeat98_260_, invoice0_.EM_Aeatsii_Description_ID as EM_Aeat99_260_, invoice0_.EM_Aeatsii_Descripcion_Sii as EM_Aea100_260_, invoice0_.EM_Aeatsii_Fecha_Reg_Cont as EM_Aea101_260_, invoice0_.EM_Aeatsii_Dup as EM_Aea102_260_, invoice0_.EM_Aeatsii_Error_Code as EM_Aea103_260_, invoice0_.EM_Aeatsii_Error_Msg as EM_Aea104_260_, invoice0_.EM_Aeatsii_Unsubscribe as EM_Aea105_260_, invoice0_.EM_Aeatsii_Pur_Description_ID as EM_Aea106_260_, invoice0_.EM_Aeatsii_Multi_Dua as EM_Aea107_260_, invoice0_.EM_Aeatsii_Ejercicio as EM_Aea108_260_, invoice0_.EM_Aeatsii_Periodo as EM_Aea109_260_, invoice0_.EM_Aeatsii_Autofactura as EM_Aea110_260_, invoice0_.EM_Aeatsii_Invoice_ID as EM_Aea111_260_, invoice0_.EM_Aeatsii_Insiidate as EM_Aea112_260_, invoice0_.EM_Aeatsii_Cause_Exemption_ID as EM_Aea113_260_, invoice0_.EM_Aeatsii_Isauthorization as EM_Aea114_260_, invoice0_.EM_Aeatsii_Authorizationno as EM_Aea115_260_, invoice0_.EM_Priuti_Createpurchinv as EM_Pri116_260_, invoice0_.EM_Priuti_Generated as EM_Pri117_260_, invoice0_.EM_Priuti_Date_Complete as EM_Pri118_260_, invoice0_.EM_Prges_Expediente_ID as EM_Prg119_260_, invoice0_.EM_Priuti_User_Complete_ID as EM_Pri120_260_, invoice0_.EM_Prges_Annotation_ID as EM_Prg121_260_, invoice0_.EM_Prges_Record_Number as EM_Prg122_260_, invoice0_.EM_Priuti_Status_Of_Review as EM_Pri123_260_, invoice0_.EM_Prges_Grantotal as EM_Prg124_260_, invoice0_.EM_Priuti_Validate as EM_Pri125_260_, invoice0_.EM_Priuti_Start_Review as EM_Pri126_260_, invoice0_.EM_Prges_Poreference as EM_Prg127_260_, invoice0_.em_cactl_createfromship as em_cac128_260_ from C_Invoice invoice0_ where invoice0_.IsSOTrx=$43 and invoice0_.DocStatus<>$44 and (invoice0_.Updated>$1 or invoice0_.Processed=$45) and (invoice0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (invoice0_.AD_Client_ID in ($40 , $41)) order by invoice0_.DateInvoiced desc, invoice0_.C_Invoice_ID desc limit $42
7247cdc8b5select c_import_e0_.C_IMPORT_ENTRY_ID as C_IMPORT1_257_, c_import_e0_.AD_Client_ID as AD_Clien2_257_, c_import_e0_.AD_Org_ID as AD_Org_I3_257_, c_import_e0_.Isactive as Isactive4_257_, c_import_e0_.Created as Created5_257_, c_import_e0_.Createdby as Createdb6_257_, c_import_e0_.Updated as Updated7_257_, c_import_e0_.Updatedby as Updatedb8_257_, c_import_e0_.Imported as Imported9_257_, c_import_e0_.Jsoninfo as Jsoninf10_257_, c_import_e0_.ImportStatus as ImportS11_257_, c_import_e0_.Typeofdata as Typeofd12_257_, c_import_e0_.Errorinfo as Errorin13_257_, c_import_e0_.AD_Role_ID as AD_Role14_257_, c_import_e0_.Createdtimestamp as Created15_257_, c_import_e0_.EM_Obpos_Applications_ID as EM_Obpo16_257_, c_import_e0_.Responseinfo as Respons17_257_ from C_IMPORT_ENTRY c_import_e0_ where c_import_e0_.Typeofdata=$1 and c_import_e0_.ImportStatus=$3 order by c_import_e0_.Created, c_import_e0_.Createdtimestamp limit $2
5c9cd00b05select invoice0_.C_Invoice_ID as C_Invoic1_260_, invoice0_.AD_Client_ID as AD_Clien2_260_, invoice0_.AD_Org_ID as AD_Org_I3_260_, invoice0_.IsActive as IsActive4_260_, invoice0_.Created as Created5_260_, invoice0_.CreatedBy as CreatedB6_260_, invoice0_.Updated as Updated7_260_, invoice0_.UpdatedBy as UpdatedB8_260_, invoice0_.IsSOTrx as IsSOTrx9_260_, invoice0_.DocumentNo as Documen10_260_, invoice0_.DocStatus as DocStat11_260_, invoice0_.DocAction as DocActi12_260_, invoice0_.Processing as Process13_260_, invoice0_.Processed as Process14_260_, invoice0_.Posted as Posted15_260_, invoice0_.C_DocType_ID as C_DocTy16_260_, invoice0_.C_DocTypeTarget_ID as C_DocTy17_260_, invoice0_.C_Order_ID as C_Order18_260_, invoice0_.Description as Descrip19_260_, invoice0_.IsPrinted as IsPrint20_260_, invoice0_.SalesRep_ID as SalesRe21_260_, invoice0_.DateInvoiced as DateInv22_260_, invoice0_.DatePrinted as DatePri23_260_, invoice0_.DateAcct as DateAcc24_260_, invoice0_.C_BPartner_ID as C_BPart25_260_, invoice0_.C_BPartner_Location_ID as C_BPart26_260_, invoice0_.POReference as PORefer27_260_, invoice0_.IsDiscountPrinted as IsDisco28_260_, invoice0_.DateOrdered as DateOrd29_260_, invoice0_.C_Currency_ID as C_Curre30_260_, invoice0_.C_PaymentTerm_ID as C_Payme31_260_, invoice0_.C_Charge_ID as C_Charg32_260_, invoice0_.ChargeAmt as ChargeA33_260_, invoice0_.TotalLines as TotalLi34_260_, invoice0_.GrandTotal as GrandTo35_260_, invoice0_.M_PriceList_ID as M_Price36_260_, invoice0_.IsTaxIncluded as IsTaxIn37_260_, invoice0_.C_Campaign_ID as C_Campa38_260_, invoice0_.C_Project_ID as C_Proje39_260_, invoice0_.C_Activity_ID as C_Activ40_260_, invoice0_.CreateFrom as CreateF41_260_, invoice0_.GenerateTo as Generat42_260_, invoice0_.AD_User_ID as AD_User43_260_, invoice0_.CopyFrom as CopyFro44_260_, invoice0_.IsSelfService as IsSelfS45_260_, invoice0_.AD_OrgTrx_ID as AD_OrgT46_260_, invoice0_.User1_ID as User47_260_, invoice0_.User2_ID as User48_260_, invoice0_.Withholdingamount as Withhol49_260_, invoice0_.Taxdate as Taxdate50_260_, invoice0_.C_Withholding_ID as C_Withh51_260_, invoice0_.Ispaid as Ispaid52_260_, invoice0_.EM_Einv_Generated as EM_Einv53_260_, invoice0_.Totalpaid as Totalpa54_260_, invoice0_.EM_Einv_Sent as EM_Einv55_260_, invoice0_.OutstandingAmt as Outstan56_260_, invoice0_.DaysTillDue as DaysTil57_260_, invoice0_.DueAmt as DueAmt58_260_, invoice0_.LastCalculatedOnDate as LastCal59_260_, invoice0_.FIN_Paymentmethod_ID as FIN_Pay60_260_, invoice0_.FIN_Payment_Priority_ID as FIN_Pay61_260_, invoice0_.Finalsettlement as Finalse62_260_, invoice0_.Daysoutstanding as Daysout63_260_, invoice0_.Percentageoverdue as Percent64_260_, invoice0_.C_Costcenter_ID as C_Costc65_260_, invoice0_.Calculate_Promotions as Calcula66_260_, invoice0_.A_Asset_ID as A_Asset67_260_, invoice0_.EM_APRM_Addpayment as EM_APRM68_260_, invoice0_.Iscashvat as Iscashv69_260_, invoice0_.EM_APRM_Processinvoice as EM_APRM70_260_, invoice0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm71_260_, invoice0_.Prepaymentamt as Prepaym72_260_, invoice0_.Createfromorders as Createf73_260_, invoice0_.Createfrominouts as Createf74_260_, invoice0_.EM_Advcrm_Newactivity as EM_Advc75_260_, invoice0_.Paidamtatinvoicing as Paidamt76_260_, invoice0_.EM_Obpos_Rounding_Amount as EM_Obpo77_260_, invoice0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc78_260_, invoice0_.BPartner_ExtRef as BPartne79_260_, invoice0_.EM_Aeatsii_Send as EM_Aeat80_260_, invoice0_.EM_Obpos_Sequencename as EM_Obpo81_260_, invoice0_.EM_Aeatsii_Issent as EM_Aeat82_260_, invoice0_.EM_Obpos_Sequencenumber as EM_Obpo83_260_, invoice0_.EM_Aeatsii_Fecha_Operacion as EM_Aeat84_260_, invoice0_.EM_Aeatsii_Clave_Tipo as EM_Aeat85_260_, invoice0_.EM_Aeatsii_Motivo_Rectif as EM_Aeat86_260_, invoice0_.EM_Prouti_Recalculate_Price as EM_Prou87_260_, invoice0_.EM_Aeatsii_Clave_Tipo_Fc as EM_Aeat88_260_, invoice0_.EM_Ml_Select_Product as EM_Ml_S89_260_, invoice0_.EM_Prouti_Pricecalculatetdate as EM_Prou90_260_, invoice0_.EM_Aeatsii_Tipo_Rectif as EM_Aeat91_260_, invoice0_.EM_Prouti_Totalizations as EM_Prou92_260_, invoice0_.EM_Aeatsii_Dua as EM_Aeat93_260_, invoice0_.EM_Aeatsii_Fecha_Dua as EM_Aeat94_260_, invoice0_.EM_Aeatsii_Estado as EM_Aeat95_260_, invoice0_.EM_Aeatsii_Error_Registral as EM_Aeat96_260_, invoice0_.EM_Aeatsii_Modif as EM_Aeat97_260_, invoice0_.EM_Aeatsii_Modified as EM_Aeat98_260_, invoice0_.EM_Aeatsii_Description_ID as EM_Aeat99_260_, invoice0_.EM_Aeatsii_Descripcion_Sii as EM_Aea100_260_, invoice0_.EM_Aeatsii_Fecha_Reg_Cont as EM_Aea101_260_, invoice0_.EM_Aeatsii_Dup as EM_Aea102_260_, invoice0_.EM_Aeatsii_Error_Code as EM_Aea103_260_, invoice0_.EM_Aeatsii_Error_Msg as EM_Aea104_260_, invoice0_.EM_Aeatsii_Unsubscribe as EM_Aea105_260_, invoice0_.EM_Aeatsii_Pur_Description_ID as EM_Aea106_260_, invoice0_.EM_Aeatsii_Multi_Dua as EM_Aea107_260_, invoice0_.EM_Aeatsii_Ejercicio as EM_Aea108_260_, invoice0_.EM_Aeatsii_Periodo as EM_Aea109_260_, invoice0_.EM_Aeatsii_Autofactura as EM_Aea110_260_, invoice0_.EM_Aeatsii_Invoice_ID as EM_Aea111_260_, invoice0_.EM_Aeatsii_Insiidate as EM_Aea112_260_, invoice0_.EM_Aeatsii_Cause_Exemption_ID as EM_Aea113_260_, invoice0_.EM_Aeatsii_Isauthorization as EM_Aea114_260_, invoice0_.EM_Aeatsii_Authorizationno as EM_Aea115_260_, invoice0_.EM_Priuti_Createpurchinv as EM_Pri116_260_, invoice0_.EM_Priuti_Generated as EM_Pri117_260_, invoice0_.EM_Priuti_Date_Complete as EM_Pri118_260_, invoice0_.EM_Prges_Expediente_ID as EM_Prg119_260_, invoice0_.EM_Priuti_User_Complete_ID as EM_Pri120_260_, invoice0_.EM_Prges_Annotation_ID as EM_Prg121_260_, invoice0_.EM_Prges_Record_Number as EM_Prg122_260_, invoice0_.EM_Priuti_Status_Of_Review as EM_Pri123_260_, invoice0_.EM_Prges_Grantotal as EM_Prg124_260_, invoice0_.EM_Priuti_Validate as EM_Pri125_260_, invoice0_.EM_Priuti_Start_Review as EM_Pri126_260_, invoice0_.EM_Prges_Poreference as EM_Prg127_260_, invoice0_.em_cactl_createfromship as em_cac128_260_ from C_Invoice invoice0_ where invoice0_.IsSOTrx=$43 and invoice0_.DocStatus<>$44 and (invoice0_.Updated>$1 or invoice0_.Processed=$45) and (invoice0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (invoice0_.AD_Client_ID in ($40 , $41)) order by invoice0_.GrandTotal desc, invoice0_.C_Invoice_ID desc limit $42
7b31b157d2SELECT json_agg(row_to_json(f)) as arrayRes from (select pcr.psat_checklist_result_id as id, pcr.advcrm_activity_id as activityid, pcr.psat_check_type_id as type, case when pct.type = $1 then $2 || encode(ai.binarydata , $3) else pcr."result" end as result, pcr.psat_checklist_group_id as checkgroup from psat_checklist_result pcr left join psat_check_type pct on pcr.psat_check_type_id = pct.psat_check_type_id left join ad_image ai on ai.ad_image_id = pcr.ad_image_id where $4=$5 and exists (select $6 from advcrm_activity aa where aa.advcrm_activity_id = pcr.advcrm_activity_id and ((aa.ad_user_id = $7 or exists ( select $8 from advcrm_group_users agu where agu.ad_user_id = $9 and agu.advcrm_group_id = aa.advcrm_group_id ) or exists (select $10 from advcrm_activity_users aau where aau.advcrm_activity_id = aa.advcrm_activity_id and ( aau.ad_user_id = $11 or exists (select $12 from advcrm_group_users agu where agu.ad_user_id = $13 and agu.advcrm_group_id = aau.advcrm_group_id) )))) and aa.date_start < $14 and (aa.status <> $15 or aa.date_start > $16) ) and pcr.updated > $17 order by pcr.advcrm_activity_id limit $18 offset $19) as f
82c30be2caselect materialmg0_.M_InOut_ID as M_InOut_1_463_, materialmg0_.AD_Client_ID as AD_Clien2_463_, materialmg0_.AD_Org_ID as AD_Org_I3_463_, materialmg0_.IsActive as IsActive4_463_, materialmg0_.Created as Created5_463_, materialmg0_.CreatedBy as CreatedB6_463_, materialmg0_.Updated as Updated7_463_, materialmg0_.UpdatedBy as UpdatedB8_463_, materialmg0_.IsSOTrx as IsSOTrx9_463_, materialmg0_.DocumentNo as Documen10_463_, materialmg0_.DocAction as DocActi11_463_, materialmg0_.DocStatus as DocStat12_463_, materialmg0_.Posted as Posted13_463_, materialmg0_.Processing as Process14_463_, materialmg0_.Processed as Process15_463_, materialmg0_.C_DocType_ID as C_DocTy16_463_, materialmg0_.Description as Descrip17_463_, materialmg0_.C_Order_ID as C_Order18_463_, materialmg0_.DateOrdered as DateOrd19_463_, materialmg0_.IsPrinted as IsPrint20_463_, materialmg0_.MovementType as Movemen21_463_, materialmg0_.MovementDate as Movemen22_463_, materialmg0_.DateAcct as DateAcc23_463_, materialmg0_.C_BPartner_ID as C_BPart24_463_, materialmg0_.C_BPartner_Location_ID as C_BPart25_463_, materialmg0_.M_Warehouse_ID as M_Wareh26_463_, materialmg0_.POReference as PORefer27_463_, materialmg0_.DeliveryRule as Deliver28_463_, materialmg0_.FreightCostRule as Freight29_463_, materialmg0_.FreightAmt as Freight30_463_, materialmg0_.DeliveryViaRule as Deliver31_463_, materialmg0_.M_Shipper_ID as M_Shipp32_463_, materialmg0_.C_Charge_ID as C_Charg33_463_, materialmg0_.ChargeAmt as ChargeA34_463_, materialmg0_.PriorityRule as Priorit35_463_, materialmg0_.DatePrinted as DatePri36_463_, materialmg0_.C_Invoice_ID as C_Invoi37_463_, materialmg0_.CreateFrom as CreateF38_463_, materialmg0_.GenerateTo as Generat39_463_, materialmg0_.AD_User_ID as AD_User40_463_, materialmg0_.SalesRep_ID as SalesRe41_463_, materialmg0_.NoPackages as NoPacka42_463_, materialmg0_.PickDate as PickDat43_463_, materialmg0_.ShipDate as ShipDat44_463_, materialmg0_.TrackingNo as Trackin45_463_, materialmg0_.AD_OrgTrx_ID as AD_OrgT46_463_, materialmg0_.C_Project_ID as C_Proje47_463_, materialmg0_.C_Campaign_ID as C_Campa48_463_, materialmg0_.C_Activity_ID as C_Activ49_463_, materialmg0_.User1_ID as User50_463_, materialmg0_.User2_ID as User51_463_, materialmg0_.UpdateLines as UpdateL52_463_, materialmg0_.Islogistic as Islogis53_463_, materialmg0_.Calculate_Freight as Calcula54_463_, materialmg0_.Delivery_Location_ID as Deliver55_463_, materialmg0_.M_FreightCategory_ID as M_Freig56_463_, materialmg0_.Freight_Currency_ID as Freight57_463_, materialmg0_.RM_Receipt_PickEdit as RM_Rece58_463_, materialmg0_.RM_Shipment_Pickedit as RM_Ship59_463_, materialmg0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm60_463_, materialmg0_.M_Condition_Goods_ID as M_Condi61_463_, materialmg0_.A_Asset_ID as A_Asset62_463_, materialmg0_.C_Costcenter_ID as C_Costc63_463_, materialmg0_.Process_Goods_Java as Process64_463_, materialmg0_.Isnettingshipment as Isnetti65_463_, materialmg0_.Iscompletelyinvoiced as Iscompl66_463_, materialmg0_.EM_OBMFM_Freight_ID as EM_OBMF67_463_, materialmg0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc68_463_, materialmg0_.EM_OBMFM_Delivery_Charges as EM_OBMF69_463_, materialmg0_.Invoicefromshipment as Invoice70_463_, materialmg0_.Bpartner_Extref as Bpartne71_463_, materialmg0_.EM_Prouti_Changebpartner as EM_Prou72_463_, materialmg0_.EM_Prouti_Totalqtyreceived as EM_Prou73_463_, materialmg0_.EM_OBMFM_Deliverynotes as EM_OBMF74_463_, materialmg0_.EM_Prres_Description as EM_Prre75_463_, materialmg0_.EM_Prres_Jsoninfo as EM_Prre76_463_, materialmg0_.EM_Prrgr_Description as EM_Prrg77_463_, materialmg0_.EM_Prrgr_Jsoninfo as EM_Prrg78_463_, materialmg0_.EM_Prouti_Initial_Bp_ID as EM_Prou79_463_, materialmg0_.EM_Prouti_Move_Stock as EM_Prou80_463_, materialmg0_.EM_Prouti_Stock_Moved as EM_Prou81_463_, materialmg0_.EM_Prqr_Execute as EM_Prqr82_463_, materialmg0_.em_prlab_desc as em_prla83_463_ from M_InOut materialmg0_ cross join C_DocType documentty1_ where materialmg0_.C_DocType_ID=documentty1_.C_DocType_ID and (materialmg0_.MovementType in ($43 , $44)) and materialmg0_.Islogistic=$45 and documentty1_.IsReturn=$46 and (materialmg0_.Updated>$1 or materialmg0_.Processed=$47) and (materialmg0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (materialmg0_.AD_Client_ID in ($40 , $41)) order by materialmg0_.MovementDate desc, materialmg0_.M_InOut_ID desc limit $42
51552ef4b0select fin_finacc0_.Fin_Finacc_Transaction_ID as Fin_Fina1_388_, fin_finacc0_.AD_Client_ID as AD_Clien2_388_, fin_finacc0_.AD_Org_ID as AD_Org_I3_388_, fin_finacc0_.Created as Created4_388_, fin_finacc0_.Createdby as Createdb5_388_, fin_finacc0_.Updated as Updated6_388_, fin_finacc0_.Updatedby as Updatedb7_388_, fin_finacc0_.Isactive as Isactive8_388_, fin_finacc0_.C_Currency_ID as C_Curren9_388_, fin_finacc0_.Fin_Financial_Account_ID as Fin_Fin10_388_, fin_finacc0_.Line as Line11_388_, fin_finacc0_.Fin_Payment_ID as Fin_Pay12_388_, fin_finacc0_.DateAcct as DateAcc13_388_, fin_finacc0_.C_Glitem_ID as C_Glite14_388_, fin_finacc0_.Status as Status15_388_, fin_finacc0_.Paymentamt as Payment16_388_, fin_finacc0_.Depositamt as Deposit17_388_, fin_finacc0_.Processed as Process18_388_, fin_finacc0_.Processing as Process19_388_, fin_finacc0_.Posted as Posted20_388_, fin_finacc0_.C_Project_ID as C_Proje21_388_, fin_finacc0_.C_Campaign_ID as C_Campa22_388_, fin_finacc0_.C_Activity_ID as C_Activ23_388_, fin_finacc0_.User1_ID as User24_388_, fin_finacc0_.User2_ID as User25_388_, fin_finacc0_.Trxtype as Trxtype26_388_, fin_finacc0_.Statementdate as Stateme27_388_, fin_finacc0_.Description as Descrip28_388_, fin_finacc0_.FIN_Reconciliation_ID as FIN_Rec29_388_, fin_finacc0_.CreatedByAlgorithm as Created30_388_, fin_finacc0_.Foreign_Currency_ID as Foreign31_388_, fin_finacc0_.Foreign_Convert_Rate as Foreign32_388_, fin_finacc0_.Foreign_Amount as Foreign33_388_, fin_finacc0_.C_Bpartner_ID as C_Bpart34_388_, fin_finacc0_.M_Product_ID as M_Produ35_388_, fin_finacc0_.C_Salesregion_ID as C_Sales36_388_, fin_finacc0_.C_Costcenter_ID as C_Costc37_388_, fin_finacc0_.EM_Aprm_Processed as EM_Aprm38_388_, fin_finacc0_.EM_Obpos_App_Cashup_ID as EM_Obpo39_388_, fin_finacc0_.EM_Aprm_Finacc_Trans_Origin as EM_Aprm40_388_ from FIN_Finacc_Transaction fin_finacc0_ where fin_finacc0_.Fin_Financial_Account_ID=$1 and (fin_finacc0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (fin_finacc0_.AD_Client_ID in ($40 , $41)) order by fin_finacc0_.Updated, fin_finacc0_.Fin_Finacc_Transaction_ID limit $42
75890e23a4SELECT * FROM M_GET_STOCK_PARAM($1, $2, TO_NUMBER($3), $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, TO_NUMBER($17), $18, $19, $20, $21, $22, $23)
c17924c407select businesspa0_.C_BPartner_ID as C_BPartn1_203_, businesspa0_.AD_Client_ID as AD_Clien2_203_, businesspa0_.AD_Org_ID as AD_Org_I3_203_, businesspa0_.IsActive as IsActive4_203_, businesspa0_.Created as Created5_203_, businesspa0_.CreatedBy as CreatedB6_203_, businesspa0_.Updated as Updated7_203_, businesspa0_.UpdatedBy as UpdatedB8_203_, businesspa0_.Value as Value9_203_, businesspa0_.Name as Name10_203_, businesspa0_.Name2 as Name11_203_, businesspa0_.Description as Descrip12_203_, businesspa0_.IsSummary as IsSumma13_203_, businesspa0_.C_BP_Group_ID as C_BP_Gr14_203_, businesspa0_.IsOneTime as IsOneTi15_203_, businesspa0_.IsProspect as IsProsp16_203_, businesspa0_.IsVendor as IsVendo17_203_, businesspa0_.IsCustomer as IsCusto18_203_, businesspa0_.IsEmployee as IsEmplo19_203_, businesspa0_.IsSalesRep as IsSales20_203_, businesspa0_.ReferenceNo as Referen21_203_, businesspa0_.DUNS as DUNS22_203_, businesspa0_.URL as URL23_203_, businesspa0_.AD_Language as AD_Lang24_203_, businesspa0_.TaxID as TaxID25_203_, businesspa0_.IsTaxExempt as IsTaxEx26_203_, businesspa0_.C_InvoiceSchedule_ID as C_Invoi27_203_, businesspa0_.Rating as Rating28_203_, businesspa0_.SalesVolume as SalesVo29_203_, businesspa0_.NumberEmployees as NumberE30_203_, businesspa0_.NAICS as NAICS31_203_, businesspa0_.FirstSale as FirstSa32_203_, businesspa0_.AcqusitionCost as Acqusit33_203_, businesspa0_.PotentialLifeTimeValue as Potenti34_203_, businesspa0_.ActualLifeTimeValue as ActualL35_203_, businesspa0_.ShareOfCustomer as ShareOf36_203_, businesspa0_.PaymentRule as Payment37_203_, businesspa0_.SO_CreditLimit as SO_Cred38_203_, businesspa0_.SO_CreditUsed as SO_Cred39_203_, businesspa0_.C_PaymentTerm_ID as C_Payme40_203_, businesspa0_.M_PriceList_ID as M_Price41_203_, businesspa0_.IsDiscountPrinted as IsDisco42_203_, businesspa0_.SO_Description as SO_Desc43_203_, businesspa0_.POReference as PORefer44_203_, businesspa0_.PaymentRulePO as Payment45_203_, businesspa0_.PO_PriceList_ID as PO_Pric46_203_, businesspa0_.PO_PaymentTerm_ID as PO_Paym47_203_, businesspa0_.DocumentCopies as Documen48_203_, businesspa0_.C_Greeting_ID as C_Greet49_203_, businesspa0_.InvoiceRule as Invoice50_203_, businesspa0_.DeliveryRule as Deliver51_203_, businesspa0_.DeliveryViaRule as Deliver52_203_, businesspa0_.SalesRep_ID as SalesRe53_203_, businesspa0_.BPartner_Parent_ID as BPartne54_203_, businesspa0_.SOCreditStatus as SOCredi55_203_, businesspa0_.AD_Forced_Org_ID as AD_Forc56_203_, businesspa0_.ShowPriceInOrder as ShowPri57_203_, businesspa0_.Invoicegrouping as Invoice58_203_, businesspa0_.FixMonthDay as FixMont59_203_, businesspa0_.FixMonthDay2 as FixMont60_203_, businesspa0_.Fixmonthday3 as Fixmont61_203_, businesspa0_.Isworker as Isworke62_203_, businesspa0_.UPC as UPC63_203_, businesspa0_.C_Salary_Category_ID as C_Salar64_203_, businesspa0_.Invoice_Printformat as Invoice65_203_, businesspa0_.Last_Days as Last_Da66_203_, businesspa0_.PO_Bankaccount_ID as PO_Bank67_203_, businesspa0_.PO_BP_TaxCategory_ID as PO_BP_T68_203_, businesspa0_.PO_Fixmonthday as PO_Fixm69_203_, businesspa0_.PO_Fixmonthday2 as PO_Fixm70_203_, businesspa0_.PO_Fixmonthday3 as PO_Fixm71_203_, businesspa0_.SO_Bankaccount_ID as SO_Bank72_203_, businesspa0_.SO_Bp_Taxcategory_ID as SO_Bp_T73_203_, businesspa0_.Fiscalcode as Fiscalc74_203_, businesspa0_.Isofiscalcode as Isofisc75_203_, businesspa0_.EM_Einv_Einvoice as EM_Einv76_203_, businesspa0_.PO_C_Incoterms_ID as PO_C_In77_203_, businesspa0_.EM_Einv_Format_Id as EM_Einv78_203_, businesspa0_.SO_C_Incoterms_ID as SO_C_In79_203_, businesspa0_.EM_Einv_Platform_Id as EM_Einv80_203_, businesspa0_.FIN_Paymentmethod_ID as FIN_Pay81_203_, businesspa0_.EM_Einv_Email as EM_Einv82_203_, businesspa0_.PO_Paymentmethod_ID as PO_Paym83_203_, businesspa0_.FIN_Financial_Account_ID as FIN_Fin84_203_, businesspa0_.EM_Einv_Deliverymode as EM_Einv85_203_, businesspa0_.PO_Financial_Account_ID as PO_Fina86_203_, businesspa0_.Customer_Blocking as Custome87_203_, businesspa0_.Vendor_Blocking as Vendor_88_203_, businesspa0_.SO_Payment_Blocking as SO_Paym89_203_, businesspa0_.PO_Payment_Blocking as PO_Paym90_203_, businesspa0_.SO_Invoice_Blocking as SO_Invo91_203_, businesspa0_.PO_Invoice_Blocking as PO_Invo92_203_, businesspa0_.SO_Order_Blocking as SO_Orde93_203_, businesspa0_.PO_Order_Blocking as PO_Orde94_203_, businesspa0_.SO_Goods_Blocking as SO_Good95_203_, businesspa0_.PO_Goods_Blocking as PO_Good96_203_, businesspa0_.Iscashvat as Iscashv97_203_, businesspa0_.EM_Advcrm_Newactivity as EM_Advc98_203_, businesspa0_.Update_Currency as Update_99_203_, businesspa0_.BP_Currency_ID as BP_Cur100_203_, businesspa0_.Birthplace as Birthp101_203_, businesspa0_.Birthday as Birthd102_203_, businesspa0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_203_, businesspa0_.Is_Customer_Consent as Is_Cus104_203_, businesspa0_.EM_OBSMAIL_INVOICEVIAEMAIL as EM_OBS105_203_, businesspa0_.EM_Obsepad_Mandate_Identifier as EM_Obs106_203_, businesspa0_.EM_Obsmail_Language as EM_Obs107_203_, businesspa0_.EM_Obsepad_Mandate_Date as EM_Obs108_203_, businesspa0_.EM_Aeatsii_Rep_Taxid as EM_Aea109_203_, businesspa0_.EM_Aeatsii_Menor as EM_Aea110_203_, businesspa0_.EM_Pricm_Isintercompany as EM_Pri111_203_, businesspa0_.EM_Psat_Billtobpartner_ID as EM_Psa112_203_, businesspa0_.EM_Psat_Locator_ID as EM_Psa113_203_, businesspa0_.EM_Psat_Mobile_Request as EM_Psa114_203_, businesspa0_.EM_Prges_Glitem_ID as EM_Prg115_203_, businesspa0_.EM_Rrhh_Exemployee as EM_Rrh116_203_, businesspa0_.EM_Rrhh_Candidate as EM_Rrh117_203_, businesspa0_.EM_Prpass_No_Print_Pass as EM_Prp118_203_, businesspa0_.EM_Rrhh_Holidays_Supervisor as EM_Rrh119_203_, businesspa0_.EM_Cactal_Emp_No as EM_Cac120_203_, businesspa0_.EM_Cactal_Emp_Relationship_No as EM_Cac121_203_, businesspa0_.EM_Obwpl_Bp_Block_Pickinglist as EM_Obw122_203_, businesspa0_.EM_Pruti_Addbp as EM_Pru123_203_, businesspa0_.EM_Prpass_Generatepassemployee as EM_Prp124_203_, businesspa0_.EM_Rrhh_Mainworkstation_ID as EM_Rrh125_203_, businesspa0_.EM_Rrhh_Bp_Transfer_Code as EM_Rrh126_203_, businesspa0_.EM_OBTIK_Tax_ID_Key as EM_OBT127_203_ from C_BPartner businesspa0_ where (upper((businesspa0_.Value||$3||businesspa0_.Name||$4||coalesce(to_char(businesspa0_.TaxID), $5)||$6||coalesce(to_char(businesspa0_.Name2), $7))) like upper($1) escape $8) and (exists (select $9 from C_Invoice invoice1_ inner join C_BPartner businesspa2_ on invoice1_.C_BPartner_ID=businesspa2_.C_BPartner_ID where invoice1_.IsSOTrx=$10 and invoice1_.DocStatus<>$11 and businesspa2_.C_BPartner_ID=businesspa0_.C_BPartner_ID and (invoice1_.AD_Org_ID in ($12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41 , $42 , $43 , $44 , $45 , $46 , $47 , $48 , $49)) and (invoice1_.AD_Client_ID in ($50 , $51)))) order by businesspa0_.Value, businesspa0_.Name, businesspa0_.TaxID, businesspa0_.Name2 limit $2
43a80059e4SELECT * FROM C_Invoice_Create($8, v_Record_ID)
22615c404bselect invoice0_.C_Invoice_ID as C_Invoic1_260_, invoice0_.AD_Client_ID as AD_Clien2_260_, invoice0_.AD_Org_ID as AD_Org_I3_260_, invoice0_.IsActive as IsActive4_260_, invoice0_.Created as Created5_260_, invoice0_.CreatedBy as CreatedB6_260_, invoice0_.Updated as Updated7_260_, invoice0_.UpdatedBy as UpdatedB8_260_, invoice0_.IsSOTrx as IsSOTrx9_260_, invoice0_.DocumentNo as Documen10_260_, invoice0_.DocStatus as DocStat11_260_, invoice0_.DocAction as DocActi12_260_, invoice0_.Processing as Process13_260_, invoice0_.Processed as Process14_260_, invoice0_.Posted as Posted15_260_, invoice0_.C_DocType_ID as C_DocTy16_260_, invoice0_.C_DocTypeTarget_ID as C_DocTy17_260_, invoice0_.C_Order_ID as C_Order18_260_, invoice0_.Description as Descrip19_260_, invoice0_.IsPrinted as IsPrint20_260_, invoice0_.SalesRep_ID as SalesRe21_260_, invoice0_.DateInvoiced as DateInv22_260_, invoice0_.DatePrinted as DatePri23_260_, invoice0_.DateAcct as DateAcc24_260_, invoice0_.C_BPartner_ID as C_BPart25_260_, invoice0_.C_BPartner_Location_ID as C_BPart26_260_, invoice0_.POReference as PORefer27_260_, invoice0_.IsDiscountPrinted as IsDisco28_260_, invoice0_.DateOrdered as DateOrd29_260_, invoice0_.C_Currency_ID as C_Curre30_260_, invoice0_.C_PaymentTerm_ID as C_Payme31_260_, invoice0_.C_Charge_ID as C_Charg32_260_, invoice0_.ChargeAmt as ChargeA33_260_, invoice0_.TotalLines as TotalLi34_260_, invoice0_.GrandTotal as GrandTo35_260_, invoice0_.M_PriceList_ID as M_Price36_260_, invoice0_.IsTaxIncluded as IsTaxIn37_260_, invoice0_.C_Campaign_ID as C_Campa38_260_, invoice0_.C_Project_ID as C_Proje39_260_, invoice0_.C_Activity_ID as C_Activ40_260_, invoice0_.CreateFrom as CreateF41_260_, invoice0_.GenerateTo as Generat42_260_, invoice0_.AD_User_ID as AD_User43_260_, invoice0_.CopyFrom as CopyFro44_260_, invoice0_.IsSelfService as IsSelfS45_260_, invoice0_.AD_OrgTrx_ID as AD_OrgT46_260_, invoice0_.User1_ID as User47_260_, invoice0_.User2_ID as User48_260_, invoice0_.Withholdingamount as Withhol49_260_, invoice0_.Taxdate as Taxdate50_260_, invoice0_.C_Withholding_ID as C_Withh51_260_, invoice0_.Ispaid as Ispaid52_260_, invoice0_.EM_Einv_Generated as EM_Einv53_260_, invoice0_.Totalpaid as Totalpa54_260_, invoice0_.EM_Einv_Sent as EM_Einv55_260_, invoice0_.OutstandingAmt as Outstan56_260_, invoice0_.DaysTillDue as DaysTil57_260_, invoice0_.DueAmt as DueAmt58_260_, invoice0_.LastCalculatedOnDate as LastCal59_260_, invoice0_.FIN_Paymentmethod_ID as FIN_Pay60_260_, invoice0_.FIN_Payment_Priority_ID as FIN_Pay61_260_, invoice0_.Finalsettlement as Finalse62_260_, invoice0_.Daysoutstanding as Daysout63_260_, invoice0_.Percentageoverdue as Percent64_260_, invoice0_.C_Costcenter_ID as C_Costc65_260_, invoice0_.Calculate_Promotions as Calcula66_260_, invoice0_.A_Asset_ID as A_Asset67_260_, invoice0_.EM_APRM_Addpayment as EM_APRM68_260_, invoice0_.Iscashvat as Iscashv69_260_, invoice0_.EM_APRM_Processinvoice as EM_APRM70_260_, invoice0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm71_260_, invoice0_.Prepaymentamt as Prepaym72_260_, invoice0_.Createfromorders as Createf73_260_, invoice0_.Createfrominouts as Createf74_260_, invoice0_.EM_Advcrm_Newactivity as EM_Advc75_260_, invoice0_.Paidamtatinvoicing as Paidamt76_260_, invoice0_.EM_Obpos_Rounding_Amount as EM_Obpo77_260_, invoice0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc78_260_, invoice0_.BPartner_ExtRef as BPartne79_260_, invoice0_.EM_Aeatsii_Send as EM_Aeat80_260_, invoice0_.EM_Obpos_Sequencename as EM_Obpo81_260_, invoice0_.EM_Aeatsii_Issent as EM_Aeat82_260_, invoice0_.EM_Obpos_Sequencenumber as EM_Obpo83_260_, invoice0_.EM_Aeatsii_Fecha_Operacion as EM_Aeat84_260_, invoice0_.EM_Aeatsii_Clave_Tipo as EM_Aeat85_260_, invoice0_.EM_Aeatsii_Motivo_Rectif as EM_Aeat86_260_, invoice0_.EM_Prouti_Recalculate_Price as EM_Prou87_260_, invoice0_.EM_Aeatsii_Clave_Tipo_Fc as EM_Aeat88_260_, invoice0_.EM_Ml_Select_Product as EM_Ml_S89_260_, invoice0_.EM_Prouti_Pricecalculatetdate as EM_Prou90_260_, invoice0_.EM_Aeatsii_Tipo_Rectif as EM_Aeat91_260_, invoice0_.EM_Prouti_Totalizations as EM_Prou92_260_, invoice0_.EM_Aeatsii_Dua as EM_Aeat93_260_, invoice0_.EM_Aeatsii_Fecha_Dua as EM_Aeat94_260_, invoice0_.EM_Aeatsii_Estado as EM_Aeat95_260_, invoice0_.EM_Aeatsii_Error_Registral as EM_Aeat96_260_, invoice0_.EM_Aeatsii_Modif as EM_Aeat97_260_, invoice0_.EM_Aeatsii_Modified as EM_Aeat98_260_, invoice0_.EM_Aeatsii_Description_ID as EM_Aeat99_260_, invoice0_.EM_Aeatsii_Descripcion_Sii as EM_Aea100_260_, invoice0_.EM_Aeatsii_Fecha_Reg_Cont as EM_Aea101_260_, invoice0_.EM_Aeatsii_Dup as EM_Aea102_260_, invoice0_.EM_Aeatsii_Error_Code as EM_Aea103_260_, invoice0_.EM_Aeatsii_Error_Msg as EM_Aea104_260_, invoice0_.EM_Aeatsii_Unsubscribe as EM_Aea105_260_, invoice0_.EM_Aeatsii_Pur_Description_ID as EM_Aea106_260_, invoice0_.EM_Aeatsii_Multi_Dua as EM_Aea107_260_, invoice0_.EM_Aeatsii_Ejercicio as EM_Aea108_260_, invoice0_.EM_Aeatsii_Periodo as EM_Aea109_260_, invoice0_.EM_Aeatsii_Autofactura as EM_Aea110_260_, invoice0_.EM_Aeatsii_Invoice_ID as EM_Aea111_260_, invoice0_.EM_Aeatsii_Insiidate as EM_Aea112_260_, invoice0_.EM_Aeatsii_Cause_Exemption_ID as EM_Aea113_260_, invoice0_.EM_Aeatsii_Isauthorization as EM_Aea114_260_, invoice0_.EM_Aeatsii_Authorizationno as EM_Aea115_260_, invoice0_.EM_Priuti_Createpurchinv as EM_Pri116_260_, invoice0_.EM_Priuti_Generated as EM_Pri117_260_, invoice0_.EM_Priuti_Date_Complete as EM_Pri118_260_, invoice0_.EM_Prges_Expediente_ID as EM_Prg119_260_, invoice0_.EM_Priuti_User_Complete_ID as EM_Pri120_260_, invoice0_.EM_Prges_Annotation_ID as EM_Prg121_260_, invoice0_.EM_Prges_Record_Number as EM_Prg122_260_, invoice0_.EM_Priuti_Status_Of_Review as EM_Pri123_260_, invoice0_.EM_Prges_Grantotal as EM_Prg124_260_, invoice0_.EM_Priuti_Validate as EM_Pri125_260_, invoice0_.EM_Priuti_Start_Review as EM_Pri126_260_, invoice0_.EM_Prges_Poreference as EM_Prg127_260_, invoice0_.em_cactl_createfromship as em_cac128_260_ from C_Invoice invoice0_ left outer join FIN_Payment_Schedule finpayment1_ on invoice0_.C_Invoice_ID=finpayment1_.C_Invoice_ID where invoice0_.Processed='Y' and (invoice0_.Ispaid='N' or finpayment1_.Updated>=invoice0_.LastCalculatedOnDate or invoice0_.OutstandingAmt<>0 or invoice0_.Finalsettlement is null) and invoice0_.IsActive='Y'
6e47e0b2e7select passinst.value as pass, m_product.name as name, m_product.em_prpass_doc_required as requiresDocumentation , coalesce(co.documentno,$1) as ticket, case when pt.slot_type = $2 then ptr.date::date else (ptr.date::date || $3 || ptd.hour::time)::timestamp end as hour, pt.slot_type as slot_type, passinst.unlimited as unlimited from prpass_pass_inst passinst join m_product on m_product.m_product_id=passinst.m_product_id left join c_order co on co.c_order_id = passinst.c_order_id left join prpass_timeslots_res ptr on ptr.prpass_timeslots_res_id = passinst.prpass_timeslots_res_id left join prpass_timeslots_detail ptd on ptd.prpass_timeslots_detail_id = ptr.prpass_timeslots_detail_id left join prpass_timeslots pt on pt.prpass_timeslots_id = ptd.prpass_timeslots_id where (passinst.status NOT IN ($4,$5,$6,$7) AND case when m_product.em_prpass_org_selection=$8 then (exists (select $9 from prpass_organization passorg where passorg.m_product_id=m_product.m_product_id and passorg.ad_orgtrx_id=$10)) else (not exists (select $11 from prpass_organization passorg where passorg.m_product_id=m_product.m_product_id and passorg.ad_orgtrx_id=$12)) end AND case when passinst.unlimited != $13 then not exists (select $14 from prpass_pass_trans passtrans where passtrans.prpass_pass_inst_id=passinst.prpass_pass_inst_id and passtrans.ad_validation_org_id=$15) else $16=$17 end) and (m_product.em_prpass_ispass is not null and m_product.em_prpass_ispass = $18 and m_product.isactive = $19) and (m_product.em_prpass_datefrom is null or m_product.em_prpass_datefrom <= CURRENT_DATE) and (m_product.em_prpass_dateto is null or m_product.em_prpass_dateto >= CURRENT_DATE)
784dd58a53SELECT $2 FROM ONLY "public"."c_uom" x WHERE "c_uom_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
a3e442bb19SELECT coalesce ( (SELECT ppt.prpass_timeslots_id FROM prpass_product_timeslots ppt WHERE ppt.m_product_id = mp.m_product_id AND ppt.datefrom <= $1::date AND ppt.dateto >= $2::date ORDER BY ppt.datefrom DESC LIMIT $3), mp.em_prpass_timeslots_id) as timeslot FROM m_product mp WHERE mp.m_product_id = $4
3aafe57489select order0_.C_Order_ID as C_Order_1_276_, order0_.AD_Client_ID as AD_Clien2_276_, order0_.AD_Org_ID as AD_Org_I3_276_, order0_.IsActive as IsActive4_276_, order0_.Created as Created5_276_, order0_.CreatedBy as CreatedB6_276_, order0_.Updated as Updated7_276_, order0_.UpdatedBy as UpdatedB8_276_, order0_.IsSOTrx as IsSOTrx9_276_, order0_.DocumentNo as Documen10_276_, order0_.DocStatus as DocStat11_276_, order0_.DocAction as DocActi12_276_, order0_.Processing as Process13_276_, order0_.Processed as Process14_276_, order0_.C_DocType_ID as C_DocTy15_276_, order0_.C_DocTypeTarget_ID as C_DocTy16_276_, order0_.Description as Descrip17_276_, order0_.IsDelivered as IsDeliv18_276_, order0_.IsInvoiced as IsInvoi19_276_, order0_.IsPrinted as IsPrint20_276_, order0_.IsSelected as IsSelec21_276_, order0_.SalesRep_ID as SalesRe22_276_, order0_.DateOrdered as DateOrd23_276_, order0_.DatePromised as DatePro24_276_, order0_.DatePrinted as DatePri25_276_, order0_.DateAcct as DateAcc26_276_, order0_.C_BPartner_ID as C_BPart27_276_, order0_.BillTo_ID as BillTo_28_276_, order0_.C_BPartner_Location_ID as C_BPart29_276_, order0_.POReference as PORefer30_276_, order0_.IsDiscountPrinted as IsDisco31_276_, order0_.C_Currency_ID as C_Curre32_276_, order0_.PaymentRule as Payment33_276_, order0_.C_PaymentTerm_ID as C_Payme34_276_, order0_.InvoiceRule as Invoice35_276_, order0_.DeliveryRule as Deliver36_276_, order0_.FreightCostRule as Freight37_276_, order0_.FreightAmt as Freight38_276_, order0_.DeliveryViaRule as Deliver39_276_, order0_.M_Shipper_ID as M_Shipp40_276_, order0_.C_Charge_ID as C_Charg41_276_, order0_.ChargeAmt as ChargeA42_276_, order0_.PriorityRule as Priorit43_276_, order0_.TotalLines as TotalLi44_276_, order0_.GrandTotal as GrandTo45_276_, order0_.M_Warehouse_ID as M_Wareh46_276_, order0_.M_PriceList_ID as M_Price47_276_, order0_.IsTaxIncluded as IsTaxIn48_276_, order0_.C_Campaign_ID as C_Campa49_276_, order0_.C_Project_ID as C_Proje50_276_, order0_.C_Activity_ID as C_Activ51_276_, order0_.Posted as Posted52_276_, order0_.AD_User_ID as AD_User53_276_, order0_.CopyFrom as CopyFro54_276_, order0_.DropShip_BPartner_ID as DropShi55_276_, order0_.DropShip_Location_ID as DropShi56_276_, order0_.DropShip_User_ID as DropShi57_276_, order0_.IsSelfService as IsSelfS58_276_, order0_.AD_OrgTrx_ID as AD_OrgT59_276_, order0_.User1_ID as User60_276_, order0_.User2_ID as User61_276_, order0_.Deliverynotes as Deliver62_276_, order0_.C_Incoterms_ID as C_Incot63_276_, order0_.Incotermsdescription as Incoter64_276_, order0_.Generatetemplate as Generat65_276_, order0_.Delivery_Location_ID as Deliver66_276_, order0_.CopyFromPO as CopyFro67_276_, order0_.FIN_Paymentmethod_ID as FIN_Pay68_276_, order0_.FIN_Payment_Priority_ID as FIN_Pay69_276_, order0_.RM_PickFromShipment as RM_Pick70_276_, order0_.RM_ReceiveMaterials as RM_Rece71_276_, order0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm72_276_, order0_.RM_CreateInvoice as RM_Crea73_276_, order0_.C_Return_Reason_ID as C_Retur74_276_, order0_.RM_AddOrphanLine as RM_AddO75_276_, order0_.A_Asset_ID as A_Asset76_276_, order0_.Calculate_Promotions as Calcula77_276_, order0_.C_Costcenter_ID as C_Costc78_276_, order0_.Convertquotation as Convert79_276_, order0_.C_Reject_Reason_ID as C_Rejec80_276_, order0_.validuntil as validun81_276_, order0_.Quotation_ID as Quotati82_276_, order0_.SO_Res_Status as SO_Res_83_276_, order0_.Create_POLines as Create_84_276_, order0_.EM_Obdisc_Addpack as EM_Obdi85_276_, order0_.Iscashvat as Iscashv86_276_, order0_.EM_OBMFM_Selectfreight as EM_OBMF87_276_, order0_.EM_OBMFM_Delivery_Period_ID as EM_OBMF88_276_, order0_.RM_Pickfromreceipt as RM_Pick89_276_, order0_.Cancelandreplace as Cancela90_276_, order0_.EM_Advcrm_Newactivity as EM_Advc91_276_, order0_.EM_APRM_AddPayment as EM_APRM92_276_, order0_.EM_OBMFM_Delivery_Charges as EM_OBMF93_276_, order0_.EM_OBMFM_Freight_ID as EM_OBMF94_276_, order0_.EM_Obwpl_Generatepicking as EM_Obwp95_276_, order0_.EM_Advcrm_Opportunity_ID as EM_Advc96_276_, order0_.EM_OBMFM_Weight as EM_OBMF97_276_, order0_.EM_Obwpl_Isinpickinglist as EM_Obwp98_276_, order0_.EM_Rcinv_Contractdate as EM_Rcin99_276_, order0_.EM_Obwpl_Readypl as EM_Obw100_276_, order0_.EM_Rcinv_Initialdate as EM_Rci101_276_, order0_.EM_Rcinv_Enddate as EM_Rci102_276_, order0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_276_, order0_.EM_OBMFM_Weight_Uom_ID as EM_OBM104_276_, order0_.EM_Rcinv_Frequency as EM_Rci105_276_, order0_.EM_OBMFM_Set_Weight as EM_OBM106_276_, order0_.EM_Rcinv_Renewautomatically as EM_Rci107_276_, order0_.EM_Aeatsii_Fecha_Operacion as EM_Aea108_276_, order0_.EM_Ml_Select_Product as EM_Ml_109_276_, order0_.EM_Rcinv_Renovationtimes as EM_Rci110_276_, order0_.Confirmcancelandreplace as Confir111_276_, order0_.EM_Aeatsii_Descripcion_Sii as EM_Aea112_276_, order0_.EM_Obpos_Applications_ID as EM_Obp113_276_, order0_.EM_Rcinv_Freqrenovationtime as EM_Rci114_276_, order0_.EM_Obpos_Sendemail as EM_Obp115_276_, order0_.EM_Rcinv_Ordercontract_ID as EM_Rci116_276_, order0_.EM_Obpos_Email_Status as EM_Obp117_276_, order0_.EM_Rcinv_Freqtime as EM_Rci118_276_, order0_.Cancelledorder_id as Cancel119_276_, order0_.EM_Obpos_App_Cashup_ID as EM_Obp120_276_, order0_.EM_Obpos_Createdabsolute as EM_Obp121_276_, order0_.Replacedorder_id as Replac122_276_, order0_.EM_OBPOS_NotInvoiceOnCashUp as EM_OBP123_276_, order0_.EM_Obpos_Rejected_Quotat_ID as EM_Obp124_276_, order0_.EM_Obpos_Isdeleted as EM_Obp125_276_, order0_.Iscancelled as Iscanc126_276_, order0_.EM_Obpos_Islayaway as EM_Obp127_276_, order0_.EM_Obpos_Prepaymentamt as EM_Obp128_276_, order0_.Replacementorder_ID as Replac129_276_, order0_.EM_Obpos_Prepaymentlimitamt as EM_Obp130_276_, order0_.EM_Obpos_Prepaymentlaylimitamt as EM_Obp131_276_, order0_.EM_Obpos_Rounding_Amount as EM_Obp132_276_, order0_.BPartner_ExtRef as BPartn133_276_, order0_.EM_Obpos_Sequencename as EM_Obp134_276_, order0_.EM_Prqc_Clauses_Selector as EM_Prq135_276_, order0_.EM_Obpos_Sequencenumber as EM_Obp136_276_, order0_.EM_Rcinv_Cancelcontract as EM_Rci137_276_, order0_.EM_Rcinv_Cancelleddate as EM_Rci138_276_, order0_.EM_Rcinv_Iscancelled as EM_Rci139_276_, order0_.EM_Psat_Activity_ID as EM_Psa140_276_, order0_.EM_OBSMAIL_EmailAddress as EM_OBS141_276_, order0_.EM_Prouti_Order_Stock as EM_Pro142_276_, order0_.EM_Prouti_Pregenerate_Minout as EM_Pro143_276_, order0_.EM_Prouti_Sotopo as EM_Pro144_276_, order0_.EM_Prouti_Generate_Pick_Inv as EM_Pro145_276_, order0_.EM_Pricm_Order_ID as EM_Pri146_276_, order0_.EM_Prouti_Order_ID as EM_Pro147_276_, order0_.EM_Prouti_Grandtotalinitial as EM_Pro148_276_, order0_.EM_Prouti_Dateclosed as EM_Pro149_276_, order0_.EM_Prouti_Totallinesinitial as EM_Pro150_276_, order0_.EM_Prouti_Changebpartner as EM_Pro151_276_, order0_.EM_Prouti_Recalculate_Price as EM_Pro152_276_, order0_.em_prqr_execute as em_prq153_276_, order0_.EM_Prouti_Pricecalculatetdate as EM_Pro154_276_, order0_.EM_Prqr_Execute_Purchase as EM_Prq155_276_, order0_.EM_Prouti_Reactiveorder as EM_Pro156_276_, order0_.EM_Prqr_Return_Select_Prod as EM_Prq157_276_, order0_.EM_Prouti_Totalizations as EM_Pro158_276_, order0_.em_prouti_Invoiced as em_pro159_276_, order0_.em_prouti_Received as em_pro160_276_, order0_.em_prouti_initial_received as em_pro161_276_, order0_.EM_Prouti_Status_Of_Review as EM_Pro162_276_, order0_.EM_Prouti_Validate_Order as EM_Pro163_276_, order0_.EM_Prouti_Start_Review as EM_Pro164_276_, order0_.EM_Ml_Select_Product_Byattrib as EM_Ml_165_276_, order0_.EM_Prres_Reservation_ID as EM_Prr166_276_, order0_.EM_Prres_Responsible_ID as EM_Prr167_276_, order0_.EM_Prres_Diners as EM_Prr168_276_, order0_.EM_Prres_Sended as EM_Prr169_276_, order0_.EM_Prres_Printed as EM_Prr170_276_, order0_.EM_Prouti_Initial_Bp_ID as EM_Pro171_276_, order0_.EM_Prouti_Addlines_Btn as EM_Pro172_276_, order0_.EM_Prtoma_Tomaticket_ID as EM_Prt173_276_, order0_.EM_Cactl_IsCopy as EM_Cac174_276_, order0_.EM_Prtoma_Jsonorder as EM_Prt175_276_, order0_.EM_Prres_Paid_On_Credit as EM_Prr176_276_, order0_.EM_Prtoma_Grossamount as EM_Prt177_276_, order0_.EM_Cactl_Internal_Notes_Group as EM_Cac178_276_, order0_.EM_Prouti_Changebpartner_Bgt as EM_Pro179_276_, order0_.EM_Prrgr_Locator_ID as EM_Prr180_276_, order0_.EM_Paytef_Transactionreference as EM_Pay181_276_, order0_.EM_Cactl_Indirect_Cost_ID as EM_Cac182_276_, order0_.EM_Cactl_Calculate_Cost as EM_Cac183_276_, order0_.EM_Cactl_Totalcost as EM_Cac184_276_, order0_.EM_Cactl_Forceselectedproject as EM_Cac185_276_, order0_.EM_Cactl_Verified_Return as EM_Cac186_276_, order0_.EM_Cactl_Duplicate_Budget as EM_Cac187_276_, order0_.EM_Prres_Orig_Order_ID as EM_Prr188_276_, order0_.EM_Prcpr_Is_Cloned as EM_Prc189_276_, order0_.EM_Prouti_Select_Soline as EM_Pro190_276_, order0_.EM_Prouti_Return_Quantity as EM_Pro191_276_, order0_.EM_Prqr_Executecredit as EM_Prq192_276_, order0_.Em_Prqr_Credit_Purchase_ID as Em_Prq193_276_ from C_Order order0_ cross join C_DocType documentty1_ where order0_.C_DocTypeTarget_ID=documentty1_.C_DocType_ID and order0_.IsSOTrx=$43 and documentty1_.IsReturn=$44 and (order0_.Updated>$1 or order0_.Processed=$45) and (order0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (order0_.AD_Client_ID in ($40 , $41)) order by order0_.DatePromised desc, order0_.C_Order_ID desc limit $42
ec8c626e99COPY public.ad_image (ad_image_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, name, imageurl, binarydata, width, height, mimetype) TO stdout
4dea79c24dselect invoice0_.C_Invoice_ID as C_Invoic1_260_, invoice0_.AD_Client_ID as AD_Clien2_260_, invoice0_.AD_Org_ID as AD_Org_I3_260_, invoice0_.IsActive as IsActive4_260_, invoice0_.Created as Created5_260_, invoice0_.CreatedBy as CreatedB6_260_, invoice0_.Updated as Updated7_260_, invoice0_.UpdatedBy as UpdatedB8_260_, invoice0_.IsSOTrx as IsSOTrx9_260_, invoice0_.DocumentNo as Documen10_260_, invoice0_.DocStatus as DocStat11_260_, invoice0_.DocAction as DocActi12_260_, invoice0_.Processing as Process13_260_, invoice0_.Processed as Process14_260_, invoice0_.Posted as Posted15_260_, invoice0_.C_DocType_ID as C_DocTy16_260_, invoice0_.C_DocTypeTarget_ID as C_DocTy17_260_, invoice0_.C_Order_ID as C_Order18_260_, invoice0_.Description as Descrip19_260_, invoice0_.IsPrinted as IsPrint20_260_, invoice0_.SalesRep_ID as SalesRe21_260_, invoice0_.DateInvoiced as DateInv22_260_, invoice0_.DatePrinted as DatePri23_260_, invoice0_.DateAcct as DateAcc24_260_, invoice0_.C_BPartner_ID as C_BPart25_260_, invoice0_.C_BPartner_Location_ID as C_BPart26_260_, invoice0_.POReference as PORefer27_260_, invoice0_.IsDiscountPrinted as IsDisco28_260_, invoice0_.DateOrdered as DateOrd29_260_, invoice0_.C_Currency_ID as C_Curre30_260_, invoice0_.C_PaymentTerm_ID as C_Payme31_260_, invoice0_.C_Charge_ID as C_Charg32_260_, invoice0_.ChargeAmt as ChargeA33_260_, invoice0_.TotalLines as TotalLi34_260_, invoice0_.GrandTotal as GrandTo35_260_, invoice0_.M_PriceList_ID as M_Price36_260_, invoice0_.IsTaxIncluded as IsTaxIn37_260_, invoice0_.C_Campaign_ID as C_Campa38_260_, invoice0_.C_Project_ID as C_Proje39_260_, invoice0_.C_Activity_ID as C_Activ40_260_, invoice0_.CreateFrom as CreateF41_260_, invoice0_.GenerateTo as Generat42_260_, invoice0_.AD_User_ID as AD_User43_260_, invoice0_.CopyFrom as CopyFro44_260_, invoice0_.IsSelfService as IsSelfS45_260_, invoice0_.AD_OrgTrx_ID as AD_OrgT46_260_, invoice0_.User1_ID as User47_260_, invoice0_.User2_ID as User48_260_, invoice0_.Withholdingamount as Withhol49_260_, invoice0_.Taxdate as Taxdate50_260_, invoice0_.C_Withholding_ID as C_Withh51_260_, invoice0_.Ispaid as Ispaid52_260_, invoice0_.EM_Einv_Generated as EM_Einv53_260_, invoice0_.Totalpaid as Totalpa54_260_, invoice0_.EM_Einv_Sent as EM_Einv55_260_, invoice0_.OutstandingAmt as Outstan56_260_, invoice0_.DaysTillDue as DaysTil57_260_, invoice0_.DueAmt as DueAmt58_260_, invoice0_.LastCalculatedOnDate as LastCal59_260_, invoice0_.FIN_Paymentmethod_ID as FIN_Pay60_260_, invoice0_.FIN_Payment_Priority_ID as FIN_Pay61_260_, invoice0_.Finalsettlement as Finalse62_260_, invoice0_.Daysoutstanding as Daysout63_260_, invoice0_.Percentageoverdue as Percent64_260_, invoice0_.C_Costcenter_ID as C_Costc65_260_, invoice0_.Calculate_Promotions as Calcula66_260_, invoice0_.A_Asset_ID as A_Asset67_260_, invoice0_.EM_APRM_Addpayment as EM_APRM68_260_, invoice0_.Iscashvat as Iscashv69_260_, invoice0_.EM_APRM_Processinvoice as EM_APRM70_260_, invoice0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm71_260_, invoice0_.Prepaymentamt as Prepaym72_260_, invoice0_.Createfromorders as Createf73_260_, invoice0_.Createfrominouts as Createf74_260_, invoice0_.EM_Advcrm_Newactivity as EM_Advc75_260_, invoice0_.Paidamtatinvoicing as Paidamt76_260_, invoice0_.EM_Obpos_Rounding_Amount as EM_Obpo77_260_, invoice0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc78_260_, invoice0_.BPartner_ExtRef as BPartne79_260_, invoice0_.EM_Aeatsii_Send as EM_Aeat80_260_, invoice0_.EM_Obpos_Sequencename as EM_Obpo81_260_, invoice0_.EM_Aeatsii_Issent as EM_Aeat82_260_, invoice0_.EM_Obpos_Sequencenumber as EM_Obpo83_260_, invoice0_.EM_Aeatsii_Fecha_Operacion as EM_Aeat84_260_, invoice0_.EM_Aeatsii_Clave_Tipo as EM_Aeat85_260_, invoice0_.EM_Aeatsii_Motivo_Rectif as EM_Aeat86_260_, invoice0_.EM_Prouti_Recalculate_Price as EM_Prou87_260_, invoice0_.EM_Aeatsii_Clave_Tipo_Fc as EM_Aeat88_260_, invoice0_.EM_Ml_Select_Product as EM_Ml_S89_260_, invoice0_.EM_Prouti_Pricecalculatetdate as EM_Prou90_260_, invoice0_.EM_Aeatsii_Tipo_Rectif as EM_Aeat91_260_, invoice0_.EM_Prouti_Totalizations as EM_Prou92_260_, invoice0_.EM_Aeatsii_Dua as EM_Aeat93_260_, invoice0_.EM_Aeatsii_Fecha_Dua as EM_Aeat94_260_, invoice0_.EM_Aeatsii_Estado as EM_Aeat95_260_, invoice0_.EM_Aeatsii_Error_Registral as EM_Aeat96_260_, invoice0_.EM_Aeatsii_Modif as EM_Aeat97_260_, invoice0_.EM_Aeatsii_Modified as EM_Aeat98_260_, invoice0_.EM_Aeatsii_Description_ID as EM_Aeat99_260_, invoice0_.EM_Aeatsii_Descripcion_Sii as EM_Aea100_260_, invoice0_.EM_Aeatsii_Fecha_Reg_Cont as EM_Aea101_260_, invoice0_.EM_Aeatsii_Dup as EM_Aea102_260_, invoice0_.EM_Aeatsii_Error_Code as EM_Aea103_260_, invoice0_.EM_Aeatsii_Error_Msg as EM_Aea104_260_, invoice0_.EM_Aeatsii_Unsubscribe as EM_Aea105_260_, invoice0_.EM_Aeatsii_Pur_Description_ID as EM_Aea106_260_, invoice0_.EM_Aeatsii_Multi_Dua as EM_Aea107_260_, invoice0_.EM_Aeatsii_Ejercicio as EM_Aea108_260_, invoice0_.EM_Aeatsii_Periodo as EM_Aea109_260_, invoice0_.EM_Aeatsii_Autofactura as EM_Aea110_260_, invoice0_.EM_Aeatsii_Invoice_ID as EM_Aea111_260_, invoice0_.EM_Aeatsii_Insiidate as EM_Aea112_260_, invoice0_.EM_Aeatsii_Cause_Exemption_ID as EM_Aea113_260_, invoice0_.EM_Aeatsii_Isauthorization as EM_Aea114_260_, invoice0_.EM_Aeatsii_Authorizationno as EM_Aea115_260_, invoice0_.EM_Priuti_Createpurchinv as EM_Pri116_260_, invoice0_.EM_Priuti_Generated as EM_Pri117_260_, invoice0_.EM_Priuti_Date_Complete as EM_Pri118_260_, invoice0_.EM_Prges_Expediente_ID as EM_Prg119_260_, invoice0_.EM_Priuti_User_Complete_ID as EM_Pri120_260_, invoice0_.EM_Prges_Annotation_ID as EM_Prg121_260_, invoice0_.EM_Prges_Record_Number as EM_Prg122_260_, invoice0_.EM_Priuti_Status_Of_Review as EM_Pri123_260_, invoice0_.EM_Prges_Grantotal as EM_Prg124_260_, invoice0_.EM_Priuti_Validate as EM_Pri125_260_, invoice0_.EM_Priuti_Start_Review as EM_Pri126_260_, invoice0_.EM_Prges_Poreference as EM_Prg127_260_, invoice0_.em_cactl_createfromship as em_cac128_260_ from C_Invoice invoice0_ where invoice0_.IsSOTrx=$43 and invoice0_.DocStatus<>$44 and (invoice0_.Updated>$1 or invoice0_.Processed=$45) and (invoice0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (invoice0_.AD_Client_ID in ($40 , $41)) order by invoice0_.OutstandingAmt, invoice0_.C_Invoice_ID limit $42
2bbd1014edSELECT $2 FROM ONLY "public"."c_doctype" x WHERE "c_doctype_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
6856866d41select sum(invoice0_.GrandTotal) as col_0_0_, sum(invoice0_.Totalpaid) as col_1_0_, sum(invoice0_.OutstandingAmt) as col_2_0_ from C_Invoice invoice0_ where invoice0_.IsSOTrx=$42 and invoice0_.DocStatus<>$43 and (invoice0_.AD_Org_ID in ($1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38)) and (invoice0_.AD_Client_ID in ($39 , $40)) limit $41
6aeca8addcSELECT * FROM (select fa.fin_financial_account_id AS referencekey_id, ad_column_identifier_std($2, fa.fin_financial_account_id) AS record_id, $3 AS ad_role_id, $4 AS ad_user_id, $5 || fa.name || $6 || fa.currentbalance || $7 || (fa.initialbalance + (select sum(depositamt) - sum(paymentamt) from fin_finacc_transaction where fa.fin_financial_account_id=fin_finacc_transaction.fin_financial_account_id and fin_finacc_transaction.processed=$8)) || $9|| fa.currentbalance- (fa.initialbalance + (select sum(depositamt) - sum(paymentamt) from fin_finacc_transaction where fa.fin_financial_account_id=fin_finacc_transaction.fin_financial_account_id and fin_finacc_transaction.processed=$10)) AS description, $11 AS isActive, $12 AS ad_org_id, fa.ad_client_id AS ad_client_id, now() AS created, $13 AS createdBy, now() AS updated, $14 AS updatedBy from fin_financial_account fa where fa.currentbalance <> fa.initialbalance + (select sum(depositamt) - sum(paymentamt) from fin_finacc_transaction where fa.fin_financial_account_id=fin_finacc_transaction.fin_financial_account_id and fin_finacc_transaction.processed=$15)) AAA where not exists (select $16 from ad_alert a where a.ad_alertrule_id = $1 and a.referencekey_id = aaa.referencekey_id and coalesce(a.status, $17) != $18)
a332052f8cselect invoice0_.C_Invoice_ID as C_Invoic1_260_, invoice0_.AD_Client_ID as AD_Clien2_260_, invoice0_.AD_Org_ID as AD_Org_I3_260_, invoice0_.IsActive as IsActive4_260_, invoice0_.Created as Created5_260_, invoice0_.CreatedBy as CreatedB6_260_, invoice0_.Updated as Updated7_260_, invoice0_.UpdatedBy as UpdatedB8_260_, invoice0_.IsSOTrx as IsSOTrx9_260_, invoice0_.DocumentNo as Documen10_260_, invoice0_.DocStatus as DocStat11_260_, invoice0_.DocAction as DocActi12_260_, invoice0_.Processing as Process13_260_, invoice0_.Processed as Process14_260_, invoice0_.Posted as Posted15_260_, invoice0_.C_DocType_ID as C_DocTy16_260_, invoice0_.C_DocTypeTarget_ID as C_DocTy17_260_, invoice0_.C_Order_ID as C_Order18_260_, invoice0_.Description as Descrip19_260_, invoice0_.IsPrinted as IsPrint20_260_, invoice0_.SalesRep_ID as SalesRe21_260_, invoice0_.DateInvoiced as DateInv22_260_, invoice0_.DatePrinted as DatePri23_260_, invoice0_.DateAcct as DateAcc24_260_, invoice0_.C_BPartner_ID as C_BPart25_260_, invoice0_.C_BPartner_Location_ID as C_BPart26_260_, invoice0_.POReference as PORefer27_260_, invoice0_.IsDiscountPrinted as IsDisco28_260_, invoice0_.DateOrdered as DateOrd29_260_, invoice0_.C_Currency_ID as C_Curre30_260_, invoice0_.C_PaymentTerm_ID as C_Payme31_260_, invoice0_.C_Charge_ID as C_Charg32_260_, invoice0_.ChargeAmt as ChargeA33_260_, invoice0_.TotalLines as TotalLi34_260_, invoice0_.GrandTotal as GrandTo35_260_, invoice0_.M_PriceList_ID as M_Price36_260_, invoice0_.IsTaxIncluded as IsTaxIn37_260_, invoice0_.C_Campaign_ID as C_Campa38_260_, invoice0_.C_Project_ID as C_Proje39_260_, invoice0_.C_Activity_ID as C_Activ40_260_, invoice0_.CreateFrom as CreateF41_260_, invoice0_.GenerateTo as Generat42_260_, invoice0_.AD_User_ID as AD_User43_260_, invoice0_.CopyFrom as CopyFro44_260_, invoice0_.IsSelfService as IsSelfS45_260_, invoice0_.AD_OrgTrx_ID as AD_OrgT46_260_, invoice0_.User1_ID as User47_260_, invoice0_.User2_ID as User48_260_, invoice0_.Withholdingamount as Withhol49_260_, invoice0_.Taxdate as Taxdate50_260_, invoice0_.C_Withholding_ID as C_Withh51_260_, invoice0_.Ispaid as Ispaid52_260_, invoice0_.EM_Einv_Generated as EM_Einv53_260_, invoice0_.Totalpaid as Totalpa54_260_, invoice0_.EM_Einv_Sent as EM_Einv55_260_, invoice0_.OutstandingAmt as Outstan56_260_, invoice0_.DaysTillDue as DaysTil57_260_, invoice0_.DueAmt as DueAmt58_260_, invoice0_.LastCalculatedOnDate as LastCal59_260_, invoice0_.FIN_Paymentmethod_ID as FIN_Pay60_260_, invoice0_.FIN_Payment_Priority_ID as FIN_Pay61_260_, invoice0_.Finalsettlement as Finalse62_260_, invoice0_.Daysoutstanding as Daysout63_260_, invoice0_.Percentageoverdue as Percent64_260_, invoice0_.C_Costcenter_ID as C_Costc65_260_, invoice0_.Calculate_Promotions as Calcula66_260_, invoice0_.A_Asset_ID as A_Asset67_260_, invoice0_.EM_APRM_Addpayment as EM_APRM68_260_, invoice0_.Iscashvat as Iscashv69_260_, invoice0_.EM_APRM_Processinvoice as EM_APRM70_260_, invoice0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm71_260_, invoice0_.Prepaymentamt as Prepaym72_260_, invoice0_.Createfromorders as Createf73_260_, invoice0_.Createfrominouts as Createf74_260_, invoice0_.EM_Advcrm_Newactivity as EM_Advc75_260_, invoice0_.Paidamtatinvoicing as Paidamt76_260_, invoice0_.EM_Obpos_Rounding_Amount as EM_Obpo77_260_, invoice0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc78_260_, invoice0_.BPartner_ExtRef as BPartne79_260_, invoice0_.EM_Aeatsii_Send as EM_Aeat80_260_, invoice0_.EM_Obpos_Sequencename as EM_Obpo81_260_, invoice0_.EM_Aeatsii_Issent as EM_Aeat82_260_, invoice0_.EM_Obpos_Sequencenumber as EM_Obpo83_260_, invoice0_.EM_Aeatsii_Fecha_Operacion as EM_Aeat84_260_, invoice0_.EM_Aeatsii_Clave_Tipo as EM_Aeat85_260_, invoice0_.EM_Aeatsii_Motivo_Rectif as EM_Aeat86_260_, invoice0_.EM_Prouti_Recalculate_Price as EM_Prou87_260_, invoice0_.EM_Aeatsii_Clave_Tipo_Fc as EM_Aeat88_260_, invoice0_.EM_Ml_Select_Product as EM_Ml_S89_260_, invoice0_.EM_Prouti_Pricecalculatetdate as EM_Prou90_260_, invoice0_.EM_Aeatsii_Tipo_Rectif as EM_Aeat91_260_, invoice0_.EM_Prouti_Totalizations as EM_Prou92_260_, invoice0_.EM_Aeatsii_Dua as EM_Aeat93_260_, invoice0_.EM_Aeatsii_Fecha_Dua as EM_Aeat94_260_, invoice0_.EM_Aeatsii_Estado as EM_Aeat95_260_, invoice0_.EM_Aeatsii_Error_Registral as EM_Aeat96_260_, invoice0_.EM_Aeatsii_Modif as EM_Aeat97_260_, invoice0_.EM_Aeatsii_Modified as EM_Aeat98_260_, invoice0_.EM_Aeatsii_Description_ID as EM_Aeat99_260_, invoice0_.EM_Aeatsii_Descripcion_Sii as EM_Aea100_260_, invoice0_.EM_Aeatsii_Fecha_Reg_Cont as EM_Aea101_260_, invoice0_.EM_Aeatsii_Dup as EM_Aea102_260_, invoice0_.EM_Aeatsii_Error_Code as EM_Aea103_260_, invoice0_.EM_Aeatsii_Error_Msg as EM_Aea104_260_, invoice0_.EM_Aeatsii_Unsubscribe as EM_Aea105_260_, invoice0_.EM_Aeatsii_Pur_Description_ID as EM_Aea106_260_, invoice0_.EM_Aeatsii_Multi_Dua as EM_Aea107_260_, invoice0_.EM_Aeatsii_Ejercicio as EM_Aea108_260_, invoice0_.EM_Aeatsii_Periodo as EM_Aea109_260_, invoice0_.EM_Aeatsii_Autofactura as EM_Aea110_260_, invoice0_.EM_Aeatsii_Invoice_ID as EM_Aea111_260_, invoice0_.EM_Aeatsii_Insiidate as EM_Aea112_260_, invoice0_.EM_Aeatsii_Cause_Exemption_ID as EM_Aea113_260_, invoice0_.EM_Aeatsii_Isauthorization as EM_Aea114_260_, invoice0_.EM_Aeatsii_Authorizationno as EM_Aea115_260_, invoice0_.EM_Priuti_Createpurchinv as EM_Pri116_260_, invoice0_.EM_Priuti_Generated as EM_Pri117_260_, invoice0_.EM_Priuti_Date_Complete as EM_Pri118_260_, invoice0_.EM_Prges_Expediente_ID as EM_Prg119_260_, invoice0_.EM_Priuti_User_Complete_ID as EM_Pri120_260_, invoice0_.EM_Prges_Annotation_ID as EM_Prg121_260_, invoice0_.EM_Prges_Record_Number as EM_Prg122_260_, invoice0_.EM_Priuti_Status_Of_Review as EM_Pri123_260_, invoice0_.EM_Prges_Grantotal as EM_Prg124_260_, invoice0_.EM_Priuti_Validate as EM_Pri125_260_, invoice0_.EM_Priuti_Start_Review as EM_Pri126_260_, invoice0_.EM_Prges_Poreference as EM_Prg127_260_, invoice0_.em_cactl_createfromship as em_cac128_260_ from C_Invoice invoice0_ where invoice0_.IsSOTrx=$43 and invoice0_.DocStatus<>$44 and (invoice0_.Updated>$1 or invoice0_.Processed=$45) and (invoice0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (invoice0_.AD_Client_ID in ($40 , $41)) order by invoice0_.DocumentNo, invoice0_.C_Invoice_ID limit $42
60ced86ccbselect businesspa0_.C_BPartner_ID as C_BPartn1_203_, businesspa0_.AD_Client_ID as AD_Clien2_203_, businesspa0_.AD_Org_ID as AD_Org_I3_203_, businesspa0_.IsActive as IsActive4_203_, businesspa0_.Created as Created5_203_, businesspa0_.CreatedBy as CreatedB6_203_, businesspa0_.Updated as Updated7_203_, businesspa0_.UpdatedBy as UpdatedB8_203_, businesspa0_.Value as Value9_203_, businesspa0_.Name as Name10_203_, businesspa0_.Name2 as Name11_203_, businesspa0_.Description as Descrip12_203_, businesspa0_.IsSummary as IsSumma13_203_, businesspa0_.C_BP_Group_ID as C_BP_Gr14_203_, businesspa0_.IsOneTime as IsOneTi15_203_, businesspa0_.IsProspect as IsProsp16_203_, businesspa0_.IsVendor as IsVendo17_203_, businesspa0_.IsCustomer as IsCusto18_203_, businesspa0_.IsEmployee as IsEmplo19_203_, businesspa0_.IsSalesRep as IsSales20_203_, businesspa0_.ReferenceNo as Referen21_203_, businesspa0_.DUNS as DUNS22_203_, businesspa0_.URL as URL23_203_, businesspa0_.AD_Language as AD_Lang24_203_, businesspa0_.TaxID as TaxID25_203_, businesspa0_.IsTaxExempt as IsTaxEx26_203_, businesspa0_.C_InvoiceSchedule_ID as C_Invoi27_203_, businesspa0_.Rating as Rating28_203_, businesspa0_.SalesVolume as SalesVo29_203_, businesspa0_.NumberEmployees as NumberE30_203_, businesspa0_.NAICS as NAICS31_203_, businesspa0_.FirstSale as FirstSa32_203_, businesspa0_.AcqusitionCost as Acqusit33_203_, businesspa0_.PotentialLifeTimeValue as Potenti34_203_, businesspa0_.ActualLifeTimeValue as ActualL35_203_, businesspa0_.ShareOfCustomer as ShareOf36_203_, businesspa0_.PaymentRule as Payment37_203_, businesspa0_.SO_CreditLimit as SO_Cred38_203_, businesspa0_.SO_CreditUsed as SO_Cred39_203_, businesspa0_.C_PaymentTerm_ID as C_Payme40_203_, businesspa0_.M_PriceList_ID as M_Price41_203_, businesspa0_.IsDiscountPrinted as IsDisco42_203_, businesspa0_.SO_Description as SO_Desc43_203_, businesspa0_.POReference as PORefer44_203_, businesspa0_.PaymentRulePO as Payment45_203_, businesspa0_.PO_PriceList_ID as PO_Pric46_203_, businesspa0_.PO_PaymentTerm_ID as PO_Paym47_203_, businesspa0_.DocumentCopies as Documen48_203_, businesspa0_.C_Greeting_ID as C_Greet49_203_, businesspa0_.InvoiceRule as Invoice50_203_, businesspa0_.DeliveryRule as Deliver51_203_, businesspa0_.DeliveryViaRule as Deliver52_203_, businesspa0_.SalesRep_ID as SalesRe53_203_, businesspa0_.BPartner_Parent_ID as BPartne54_203_, businesspa0_.SOCreditStatus as SOCredi55_203_, businesspa0_.AD_Forced_Org_ID as AD_Forc56_203_, businesspa0_.ShowPriceInOrder as ShowPri57_203_, businesspa0_.Invoicegrouping as Invoice58_203_, businesspa0_.FixMonthDay as FixMont59_203_, businesspa0_.FixMonthDay2 as FixMont60_203_, businesspa0_.Fixmonthday3 as Fixmont61_203_, businesspa0_.Isworker as Isworke62_203_, businesspa0_.UPC as UPC63_203_, businesspa0_.C_Salary_Category_ID as C_Salar64_203_, businesspa0_.Invoice_Printformat as Invoice65_203_, businesspa0_.Last_Days as Last_Da66_203_, businesspa0_.PO_Bankaccount_ID as PO_Bank67_203_, businesspa0_.PO_BP_TaxCategory_ID as PO_BP_T68_203_, businesspa0_.PO_Fixmonthday as PO_Fixm69_203_, businesspa0_.PO_Fixmonthday2 as PO_Fixm70_203_, businesspa0_.PO_Fixmonthday3 as PO_Fixm71_203_, businesspa0_.SO_Bankaccount_ID as SO_Bank72_203_, businesspa0_.SO_Bp_Taxcategory_ID as SO_Bp_T73_203_, businesspa0_.Fiscalcode as Fiscalc74_203_, businesspa0_.Isofiscalcode as Isofisc75_203_, businesspa0_.EM_Einv_Einvoice as EM_Einv76_203_, businesspa0_.PO_C_Incoterms_ID as PO_C_In77_203_, businesspa0_.EM_Einv_Format_Id as EM_Einv78_203_, businesspa0_.SO_C_Incoterms_ID as SO_C_In79_203_, businesspa0_.EM_Einv_Platform_Id as EM_Einv80_203_, businesspa0_.FIN_Paymentmethod_ID as FIN_Pay81_203_, businesspa0_.EM_Einv_Email as EM_Einv82_203_, businesspa0_.PO_Paymentmethod_ID as PO_Paym83_203_, businesspa0_.FIN_Financial_Account_ID as FIN_Fin84_203_, businesspa0_.EM_Einv_Deliverymode as EM_Einv85_203_, businesspa0_.PO_Financial_Account_ID as PO_Fina86_203_, businesspa0_.Customer_Blocking as Custome87_203_, businesspa0_.Vendor_Blocking as Vendor_88_203_, businesspa0_.SO_Payment_Blocking as SO_Paym89_203_, businesspa0_.PO_Payment_Blocking as PO_Paym90_203_, businesspa0_.SO_Invoice_Blocking as SO_Invo91_203_, businesspa0_.PO_Invoice_Blocking as PO_Invo92_203_, businesspa0_.SO_Order_Blocking as SO_Orde93_203_, businesspa0_.PO_Order_Blocking as PO_Orde94_203_, businesspa0_.SO_Goods_Blocking as SO_Good95_203_, businesspa0_.PO_Goods_Blocking as PO_Good96_203_, businesspa0_.Iscashvat as Iscashv97_203_, businesspa0_.EM_Advcrm_Newactivity as EM_Advc98_203_, businesspa0_.Update_Currency as Update_99_203_, businesspa0_.BP_Currency_ID as BP_Cur100_203_, businesspa0_.Birthplace as Birthp101_203_, businesspa0_.Birthday as Birthd102_203_, businesspa0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_203_, businesspa0_.Is_Customer_Consent as Is_Cus104_203_, businesspa0_.EM_OBSMAIL_INVOICEVIAEMAIL as EM_OBS105_203_, businesspa0_.EM_Obsepad_Mandate_Identifier as EM_Obs106_203_, businesspa0_.EM_Obsmail_Language as EM_Obs107_203_, businesspa0_.EM_Obsepad_Mandate_Date as EM_Obs108_203_, businesspa0_.EM_Aeatsii_Rep_Taxid as EM_Aea109_203_, businesspa0_.EM_Aeatsii_Menor as EM_Aea110_203_, businesspa0_.EM_Pricm_Isintercompany as EM_Pri111_203_, businesspa0_.EM_Psat_Billtobpartner_ID as EM_Psa112_203_, businesspa0_.EM_Psat_Locator_ID as EM_Psa113_203_, businesspa0_.EM_Psat_Mobile_Request as EM_Psa114_203_, businesspa0_.EM_Prges_Glitem_ID as EM_Prg115_203_, businesspa0_.EM_Rrhh_Exemployee as EM_Rrh116_203_, businesspa0_.EM_Rrhh_Candidate as EM_Rrh117_203_, businesspa0_.EM_Prpass_No_Print_Pass as EM_Prp118_203_, businesspa0_.EM_Rrhh_Holidays_Supervisor as EM_Rrh119_203_, businesspa0_.EM_Cactal_Emp_No as EM_Cac120_203_, businesspa0_.EM_Cactal_Emp_Relationship_No as EM_Cac121_203_, businesspa0_.EM_Obwpl_Bp_Block_Pickinglist as EM_Obw122_203_, businesspa0_.EM_Pruti_Addbp as EM_Pru123_203_, businesspa0_.EM_Prpass_Generatepassemployee as EM_Prp124_203_, businesspa0_.EM_Rrhh_Mainworkstation_ID as EM_Rrh125_203_, businesspa0_.EM_Rrhh_Bp_Transfer_Code as EM_Rrh126_203_, businesspa0_.EM_OBTIK_Tax_ID_Key as EM_OBT127_203_ from C_BPartner businesspa0_ where exists (select $3 from C_Invoice invoice1_ inner join C_BPartner businesspa2_ on invoice1_.C_BPartner_ID=businesspa2_.C_BPartner_ID where (upper((invoice1_.DocumentNo||$4||coalesce(to_char(invoice1_.DateInvoiced), $5)||$6||coalesce(to_char(invoice1_.GrandTotal), $7))) like upper($1) escape $8) and businesspa2_.C_BPartner_ID=businesspa0_.C_BPartner_ID and (invoice1_.AD_Org_ID in ($9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41 , $42 , $43 , $44 , $45 , $46)) and (invoice1_.AD_Client_ID in ($47 , $48))) order by businesspa0_.Value, businesspa0_.Name, businesspa0_.TaxID, businesspa0_.Name2 limit $2
4cb9cc1cbfSELECT C_ORDER_POST1($1, $2, $3)
4d2174a22eSELECT COUNT(*) AS ID FROM Fact_Acct WHERE M_Product_ID = $1 AND AD_ORG_ID NOT IN ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39)
6758866a26insert into obmobc_logclient ( obmobc_logclient_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, tstamp, deviceid, context, msg, loglevel, cache_session_id, isonline ) values ( get_uuid(), $1, $2, $14, to_timestamp(to_char($3), to_char($15)), $4, to_timestamp(to_char($5), to_char($16)), $6, to_number($7), $8, $9, $10, $11, $12, $13 )
964d1d9b09select materialmg0_.M_InOut_ID as M_InOut_1_463_, materialmg0_.AD_Client_ID as AD_Clien2_463_, materialmg0_.AD_Org_ID as AD_Org_I3_463_, materialmg0_.IsActive as IsActive4_463_, materialmg0_.Created as Created5_463_, materialmg0_.CreatedBy as CreatedB6_463_, materialmg0_.Updated as Updated7_463_, materialmg0_.UpdatedBy as UpdatedB8_463_, materialmg0_.IsSOTrx as IsSOTrx9_463_, materialmg0_.DocumentNo as Documen10_463_, materialmg0_.DocAction as DocActi11_463_, materialmg0_.DocStatus as DocStat12_463_, materialmg0_.Posted as Posted13_463_, materialmg0_.Processing as Process14_463_, materialmg0_.Processed as Process15_463_, materialmg0_.C_DocType_ID as C_DocTy16_463_, materialmg0_.Description as Descrip17_463_, materialmg0_.C_Order_ID as C_Order18_463_, materialmg0_.DateOrdered as DateOrd19_463_, materialmg0_.IsPrinted as IsPrint20_463_, materialmg0_.MovementType as Movemen21_463_, materialmg0_.MovementDate as Movemen22_463_, materialmg0_.DateAcct as DateAcc23_463_, materialmg0_.C_BPartner_ID as C_BPart24_463_, materialmg0_.C_BPartner_Location_ID as C_BPart25_463_, materialmg0_.M_Warehouse_ID as M_Wareh26_463_, materialmg0_.POReference as PORefer27_463_, materialmg0_.DeliveryRule as Deliver28_463_, materialmg0_.FreightCostRule as Freight29_463_, materialmg0_.FreightAmt as Freight30_463_, materialmg0_.DeliveryViaRule as Deliver31_463_, materialmg0_.M_Shipper_ID as M_Shipp32_463_, materialmg0_.C_Charge_ID as C_Charg33_463_, materialmg0_.ChargeAmt as ChargeA34_463_, materialmg0_.PriorityRule as Priorit35_463_, materialmg0_.DatePrinted as DatePri36_463_, materialmg0_.C_Invoice_ID as C_Invoi37_463_, materialmg0_.CreateFrom as CreateF38_463_, materialmg0_.GenerateTo as Generat39_463_, materialmg0_.AD_User_ID as AD_User40_463_, materialmg0_.SalesRep_ID as SalesRe41_463_, materialmg0_.NoPackages as NoPacka42_463_, materialmg0_.PickDate as PickDat43_463_, materialmg0_.ShipDate as ShipDat44_463_, materialmg0_.TrackingNo as Trackin45_463_, materialmg0_.AD_OrgTrx_ID as AD_OrgT46_463_, materialmg0_.C_Project_ID as C_Proje47_463_, materialmg0_.C_Campaign_ID as C_Campa48_463_, materialmg0_.C_Activity_ID as C_Activ49_463_, materialmg0_.User1_ID as User50_463_, materialmg0_.User2_ID as User51_463_, materialmg0_.UpdateLines as UpdateL52_463_, materialmg0_.Islogistic as Islogis53_463_, materialmg0_.Calculate_Freight as Calcula54_463_, materialmg0_.Delivery_Location_ID as Deliver55_463_, materialmg0_.M_FreightCategory_ID as M_Freig56_463_, materialmg0_.Freight_Currency_ID as Freight57_463_, materialmg0_.RM_Receipt_PickEdit as RM_Rece58_463_, materialmg0_.RM_Shipment_Pickedit as RM_Ship59_463_, materialmg0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm60_463_, materialmg0_.M_Condition_Goods_ID as M_Condi61_463_, materialmg0_.A_Asset_ID as A_Asset62_463_, materialmg0_.C_Costcenter_ID as C_Costc63_463_, materialmg0_.Process_Goods_Java as Process64_463_, materialmg0_.Isnettingshipment as Isnetti65_463_, materialmg0_.Iscompletelyinvoiced as Iscompl66_463_, materialmg0_.EM_OBMFM_Freight_ID as EM_OBMF67_463_, materialmg0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc68_463_, materialmg0_.EM_OBMFM_Delivery_Charges as EM_OBMF69_463_, materialmg0_.Invoicefromshipment as Invoice70_463_, materialmg0_.Bpartner_Extref as Bpartne71_463_, materialmg0_.EM_Prouti_Changebpartner as EM_Prou72_463_, materialmg0_.EM_Prouti_Totalqtyreceived as EM_Prou73_463_, materialmg0_.EM_OBMFM_Deliverynotes as EM_OBMF74_463_, materialmg0_.EM_Prres_Description as EM_Prre75_463_, materialmg0_.EM_Prres_Jsoninfo as EM_Prre76_463_, materialmg0_.EM_Prrgr_Description as EM_Prrg77_463_, materialmg0_.EM_Prrgr_Jsoninfo as EM_Prrg78_463_, materialmg0_.EM_Prouti_Initial_Bp_ID as EM_Prou79_463_, materialmg0_.EM_Prouti_Move_Stock as EM_Prou80_463_, materialmg0_.EM_Prouti_Stock_Moved as EM_Prou81_463_, materialmg0_.EM_Prqr_Execute as EM_Prqr82_463_, materialmg0_.em_prlab_desc as em_prla83_463_ from M_InOut materialmg0_ left outer join C_Order order1_ on materialmg0_.C_Order_ID=order1_.C_Order_ID cross join C_DocType documentty2_ where materialmg0_.C_DocType_ID=documentty2_.C_DocType_ID and (materialmg0_.MovementType in ($43 , $44)) and materialmg0_.Islogistic=$45 and documentty2_.IsReturn=$46 and (materialmg0_.Updated>$1 or materialmg0_.Processed=$47) and (materialmg0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (materialmg0_.AD_Client_ID in ($40 , $41)) order by order1_.DocumentNo desc, order1_.DateOrdered desc, order1_.GrandTotal desc, materialmg0_.M_InOut_ID desc limit $42
59ed037ff5UPDATE m_requisitionline rl SET em_cactl_consumption = cactl_calculate_consumption(rl.m_product_id, rl.ad_org_id, rl.ad_client_id) FROM m_requisition r WHERE rl.reqstatus = $1 AND rl.m_requisition_id = r.m_requisition_id AND r.docstatus = $2
5e90170047SELECT COUNT(*) AS ID FROM Fact_Acct WHERE M_Product_ID = $1 AND AD_ORG_ID IN ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39) AND AD_CLIENT_ID IN ($40)
416d959161SELECT * FROM (SELECT c_order_id AS referencekey_id, ad_column_identifier_std($2, c_order_id) AS record_id, $3 AS ad_role_id, $4 AS ad_user_id, em_prouti_totalizations AS description, $5 AS isActive, ad_org_id, ad_client_id, now() AS created, $6 AS createdBy, now() AS updated, $7 AS updatedBy FROM c_order WHERE em_prouti_totalizations IS NOT NULL) AAA where not exists (select $8 from ad_alert a where a.ad_alertrule_id = $1 and a.referencekey_id = aaa.referencekey_id and coalesce(a.status, $9) != $10)
7871717022SELECT json_agg(row_to_json(f)) as arrayRes from (select pcr.psat_checklist_result_id as id, pcr.advcrm_activity_id as activityid, pcr.psat_check_type_id as type, case when pct.type = $1 then $2 || encode(ai.binarydata , $3) else pcr."result" end as result, pcr.psat_checklist_group_id as checkgroup from psat_checklist_result pcr left join psat_check_type pct on pcr.psat_check_type_id = pct.psat_check_type_id left join ad_image ai on ai.ad_image_id = pcr.ad_image_id where $4=$5 and exists (select $6 from advcrm_activity aa where aa.advcrm_activity_id = pcr.advcrm_activity_id and ((aa.ad_user_id = $7 or exists ( select $8 from advcrm_group_users agu where agu.ad_user_id = $9 and agu.advcrm_group_id = aa.advcrm_group_id ) or exists (select $10 from advcrm_activity_users aau where aau.advcrm_activity_id = aa.advcrm_activity_id and ( aau.ad_user_id = $11 or exists (select $12 from advcrm_group_users agu where agu.ad_user_id = $13 and agu.advcrm_group_id = aau.advcrm_group_id) )))) and aa.date_start < $14 and (aa.status <> $15 or aa.date_start > $16) ) order by pcr.advcrm_activity_id limit $17 offset $18) as f
b280347c9bselect prges_reco0_.Prges_Records_ID as Prges_Re1_831_0_, prges_reco0_.AD_Client_ID as AD_Clien2_831_0_, prges_reco0_.AD_Org_ID as AD_Org_I3_831_0_, prges_reco0_.Created as Created4_831_0_, prges_reco0_.Createdby as Createdb5_831_0_, prges_reco0_.Updated as Updated6_831_0_, prges_reco0_.Updatedby as Updatedb7_831_0_, prges_reco0_.Isactive as Isactive8_831_0_, prges_reco0_.Action as Action9_831_0_, prges_reco0_.Url as Url10_831_0_, prges_reco0_.Jsoninfo as Jsoninf11_831_0_, prges_reco0_.Error as Error12_831_0_, prges_reco0_.Process as Process13_831_0_, prges_reco0_.Status as Status14_831_0_, prges_reco0_.C_Invoice_ID as C_Invoi15_831_0_, prges_reco0_.Prges_Config_ID as Prges_C16_831_0_ from prges_records prges_reco0_ where prges_reco0_.Prges_Records_ID=$1

Schema object statistics

Top tables by estimated sequentially scanned volume

DBTablespaceSchemaTable~SeqBytesSeqScanIxScanIxFetInsUpdDelUpd(HOT)
openbravopg_defaultpublicfact_acct18 TB601208310101565812249869085537
fact_acct(TOAST)
openbravopg_defaultpublicprpass_pass_inst4770 GB7811382542087332394610035174193821
prpass_pass_inst(TOAST)
openbravopg_defaultpublicc_order2667 GB35459125272324744330053972221913377
c_order(TOAST)
openbravopg_defaultpublicc_orderline1531 GB182681903981791735941070231957114852
c_orderline(TOAST)
openbravopg_defaultpublicc_invoiceline585 GB815644468052396451101063052232549
c_invoiceline(TOAST)
openbravopg_defaultpublicfin_payment_scheduledetail449 GB166212324240789535614704294115
fin_payment_scheduledetail(TOAST)
openbravopg_defaultpg_temp_16ad_context_info350 GB739557395573954
openbravopg_defaultpublicm_inout292 GB72573095027559077051611293917512
m_inout(TOAST)2476136315
openbravopg_defaultpublicprpass_timeslots_res277 GB110635041088384544492557145211053
prpass_timeslots_res(TOAST)
openbravopg_defaultpublicfin_finacc_transaction183 GB554762393410231839963825193473066
fin_finacc_transaction(TOAST)
openbravopg_defaultpublicprges_records172 GB1720366286436628646012991
prges_records(TOAST)373045518113
openbravopg_defaultpublicprres_allergens_product122 GB250411145304508
openbravopg_defaultpublicc_invoicelinetax92 GB2092088568102302623982423
c_invoicelinetax(TOAST)
openbravopg_defaultpublicc_invoicetax81 GB30245262358148044041323971
c_invoicetax(TOAST)
openbravopg_defaultpublicc_invoice62 GB95621756219895598095080125533223280
c_invoice(TOAST)
openbravopg_defaultpublicm_product61 GB637911511868128486546981890
m_product(TOAST)
openbravopg_defaultpublicm_storage_detail50 GB180414378344028367146331442394
m_storage_detail(TOAST)
openbravopg_defaultpublicad_audit_trail43 GB841157367044962
ad_audit_trail(TOAST)
openbravopg_defaultpublicm_product_bom42 GB737182074651923352308
m_product_bom(TOAST)
openbravopg_defaultpublicc_bpartner41 GB38985729811778759271717084
c_bpartner(TOAST)

Top tables by blocks fetched

DBTablespaceSchemaTableHeapIxTOASTTOAST-Ix
Blks%TotalBlks%TotalBlks%TotalBlks%Total
openbravopg_defaultpublicc_order302174379827.692920286322.68
openbravopg_defaultpublicc_invoice189739046417.392864133512.62
openbravopg_defaultpublicfin_finacc_transaction7623541666.991988372771.82
openbravopg_defaultpublicfact_acct5168024544.741358926221.25
openbravopg_defaultpublicprpass_timeslots_res5936433275.44104862200.10
openbravopg_defaultpublicc_orderline1565425201.433715160543.40
openbravopg_defaultpublicprpass_pass_inst4510835064.13622594950.57
openbravopg_defaultpublicm_inoutline999645100.924052174053.71
openbravopg_defaultpublicm_inout1141841411.052304749282.1151830.00606600.00
openbravopg_defaultpublicc_invoiceline685576770.632267316872.08
openbravopg_defaultpublicfin_payment_schedule389450470.361280906141.17
openbravopg_defaultpublicm_costing938944680.8657333070.05
openbravopg_defaultpublicm_product206218560.19237389840.22
openbravopg_defaultpublicprges_records262215890.24110395940.103834070.003730680.00
openbravopg_defaultpublicad_treenode6798220.01225314660.21
openbravopg_defaultpg_temp_16ad_context_info229750550.21
openbravopg_defaultpublicprpass_pass_trans7309090.01221954310.20
openbravopg_defaultpublicm_productprice95302110.09124230090.11
openbravopg_defaultpublicm_product_trl218152220.20
openbravopg_defaultpublicfin_payment_scheduledetail196503450.1813831580.01

Top tables by blocks read

DBTablespaceSchemaTableHeapIxTOASTTOAST-IxHit(%)
Blks%TotalBlks%TotalBlks%TotalBlks%Total
openbravopg_defaultpublicfact_acct42605946055.469902850.1334.57
openbravopg_defaultpublicc_order11682466615.2165089210.8596.28
openbravopg_defaultpublicc_orderline500078326.5138081800.5089.81
openbravopg_defaultpublicprpass_pass_inst373407504.8626994270.3592.20
openbravopg_defaultpublicc_invoice228059792.9775602490.9898.61
openbravopg_defaultpublicc_invoiceline186712992.4334526920.4592.51
openbravopg_defaultpublicfin_finacc_transaction123623761.6130229490.3998.40
openbravopg_defaultpublicm_inout85627521.1118780150.2433990.0011760.0096.97
openbravopg_defaultpublicm_inoutline67185880.8732345000.4298.03
openbravopg_defaultpublicm_costing33923990.442976590.0496.30
openbravopg_defaultpublicm_transaction19866480.266586690.0983.70
openbravopg_defaultpublicfin_payment_scheduledetail23431880.31928240.0188.42
openbravopg_defaultpublicprpass_pass_trans6582510.0916010900.2190.15
openbravopg_defaultpublicm_productionline19836230.261536630.0283.67
openbravopg_defaultpublicfin_payment_schedule18281760.242120930.0398.78
openbravopg_defaultpublicc_invoicelinetax12015920.16478210.0153.42
openbravopg_defaultpublicad_audit_trail12109820.1692010.0078.82
openbravopg_defaultpublicprpass_timeslots_res9008340.122039680.0399.82
openbravopg_defaultpublicc_orderlinetax230400.007129870.0964.16
openbravopg_defaultpublicc_invoicetax7079890.09168480.0069.51

Top DML tables

DBTablespaceSchemaTableInsUpdDelUpd(HOT)SeqScanSeqFetIxScanIxFet
openbravopg_defaultpublicobmobc_logclient74240899041257730632262475
obmobc_logclient(TOAST)1270102
openbravopg_defaultpg_temp_16ad_context_info73955739547395573954
openbravopg_defaultprofilelast_stat_indexes707021549707021184113123243301425761
openbravopg_defaultpublicc_invoice5080125533223280963103162562175621989559809
c_invoice(TOAST)
openbravopg_defaultpublicad_ep_instance_para439804398073509340695
ad_ep_instance_para(TOAST)
openbravopg_defaultprofilelast_stat_tables414073664414044018466248884584095324
openbravopg_defaultpublicc_import_entry141161411714165105118194326274259410
c_import_entry(TOAST)214372143729399106653
openbravopg_defaultpublicm_stock_aux16024401721602430622311561175970
m_stock_aux(TOAST)
openbravopg_defaultpublicm_storage_detail14633144239418049244002314378344028367
m_storage_detail(TOAST)
openbravopg_defaultpublicm_transaction16303345869621305480541742224145456
m_transaction(TOAST)
openbravopg_defaultpublicc_orderline107023195711485218254538250668190398179173594
c_orderline(TOAST)
openbravopg_defaultpg_catalogpg_statistic282372675914970051328624
pg_statistic(TOAST)47034705162627316866
openbravopg_defaultpublicfact_acct2498690855376014593562350208310101565812
fact_acct(TOAST)
openbravopg_defaultpublicc_import_entry_archive22792881188410106542881
c_import_entry_archive(TOAST)120361577393570493461
openbravopg_defaultpublicfin_payment356725077967721260784838196653711940
fin_payment(TOAST)
openbravopg_defaultpublicm_productionline96421845631762212003500428364956822532
m_productionline(TOAST)
openbravopg_defaultpublicc_order539722219133773542395749072591252723247443300
c_order(TOAST)
openbravopg_defaultpublicprpass_pass_inst10035174193821781298635748713825420873323946
prpass_pass_inst(TOAST)
openbravopg_defaultprofilelast_stat_user_functions1242016031242090388369360
last_stat_user_functions(TOAST)
openbravopg_defaultpublicfin_payment_schedule10325143172548543187949538662049
fin_payment_schedule(TOAST)

Top tables by updated/deleted tuples

DBTablespaceSchemaTableUpdUpd(HOT)DelVacuumAutoVacuumAnalyzeAutoAnalyze
openbravopg_defaultpublicc_invoice125533232802
c_invoice(TOAST)
openbravopg_defaultpublicobmobc_logclient8990411
obmobc_logclient(TOAST)21
openbravopg_defaultpg_temp_16ad_context_info73954
openbravopg_defaultprofilelast_stat_indexes15491707021524623
openbravopg_defaultpublicm_storage_detail6331442394212
m_storage_detail(TOAST)
openbravopg_defaultpublicm_stock_aux401723062216024116189
m_stock_aux(TOAST)
openbravopg_defaultpublicc_import_entry1411714165101174
c_import_entry(TOAST)2143712
openbravopg_defaultprofilelast_stat_tables366440414041524623
openbravopg_defaultpublicad_ep_instance_para43980602743
ad_ep_instance_para(TOAST)
openbravopg_defaultpublicm_transaction34586962
m_transaction(TOAST)
openbravopg_defaultpg_catalogpg_statistic28237267592
pg_statistic(TOAST)47058
openbravopg_defaultpublicc_orderline31957148521
c_orderline(TOAST)
openbravopg_defaultpublicfin_payment250779677
fin_payment(TOAST)
openbravopg_defaultpublicc_order2221913377
c_order(TOAST)
openbravopg_defaultpg_catalogpg_class1974119736242619
openbravopg_defaultpublicfin_finacc_transaction193473066
fin_finacc_transaction(TOAST)
openbravopg_defaultpublicc_import_entry_archive288111
c_import_entry_archive(TOAST)157731
openbravopg_defaultpublicm_productionline18456176223
m_productionline(TOAST)
openbravopg_defaultpublicprpass_pass_inst174193821
prpass_pass_inst(TOAST)
openbravopg_defaultpublicfin_payment_scheduledetail14704411529
fin_payment_scheduledetail(TOAST)

Top growing tables

DBTablespaceSchemaTableSizeGrowthInsUpdDelUpd(HOT)
openbravopg_defaultpublicfact_acct31 GB23 MB249869085537
fact_acct(TOAST)
openbravopg_defaultpublicc_order7722 MB17 MB53972221913377
c_order(TOAST)
openbravopg_defaultpublicc_orderline8625 MB17 MB1070231957114852
c_orderline(TOAST)
openbravopg_defaultpublicprpass_pass_inst6257 MB8424 kB10035174193821
prpass_pass_inst(TOAST)
openbravopg_defaultpublicc_invoiceline7405 MB6376 kB101063052232549
c_invoiceline(TOAST)
openbravopg_defaultpublicfin_payment_schedule5088 MB5664 kB1032514317254854
fin_payment_schedule(TOAST)
openbravopg_defaultpublicm_inout4152 MB5544 kB51611293917512
m_inout(TOAST)29 MB8192 bytes5
openbravopg_defaultpublicm_inoutline5960 MB5136 kB101862684142440
m_inoutline(TOAST)
openbravopg_defaultpublicc_orderlinetax4728 MB4736 kB1084227571182468
c_orderlinetax(TOAST)
openbravopg_defaultpublicc_invoicelinetax4696 MB4448 kB102302623982423
c_invoicelinetax(TOAST)
openbravopg_defaultpublicfin_finacc_transaction3414 MB4152 kB3825193473066
fin_finacc_transaction(TOAST)
openbravopg_defaultpublicprpass_pass_trans5141 MB3552 kB8732
openbravopg_defaultpublicad_audit_trail528 MB1504 kB4962
ad_audit_trail(TOAST)
openbravopg_defaultpublicm_productionplan1238 MB360 kB77444
m_productionplan(TOAST)
openbravopg_defaultpublicm_product10136 kB256 kB6981890
m_product(TOAST)
openbravopg_defaultpublicprges_records103 MB176 kB6012991
prges_records(TOAST)536 kB
openbravopg_defaultpg_temp_6ad_context_info128 kB128 kB30253024
openbravopg_defaultpublicm_production495 MB112 kB159314161
m_production(TOAST)
openbravopg_defaultpublicobre_reservation176 kB24 kB32119643185
obre_reservation(TOAST)168 kB16 kB37873787
openbravopg_defaultpg_temp_12ad_context_info40 kB40 kB175174

Top indexes by blocks fetched

DBTablespaceSchemaTableIndexScansBlks%Total
openbravopg_defaultpublicm_inoutlinem_inoutline_orderline1006955894041937203.70
openbravopg_defaultpublicc_orderc_order_key589289022356312752.16
openbravopg_defaultpublicc_invoicelinec_invoiceline_orderline561672202254468332.07
openbravopg_defaultpublicc_invoicec_invoice_key561009432253629662.07
openbravopg_defaultpublicm_inoutm_inout_key550569932206872632.02
openbravopg_defaultpublicc_orderlineem_obpos_orderedqty495837651997746881.83
openbravopg_defaultpublicfin_finacc_transactionfin_finacc_transaction_key475788691906470161.75
openbravopg_defaultpublicfact_acctfact_acct_table_record_id1186121335913061.22
openbravopg_defaultpublicfin_payment_schedulefin_payment_schedule_key315505961265166081.16
openbravopg_defaultpublicc_orderlinec_orderline_product3095127955575200.88
openbravopg_defaultpublicc_orderlinec_orderline_key15369656614664210.56
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_orderline13772130551161010.51
openbravopg_defaultpublicc_invoicec_invoice_client_org_date_doc95038536227020.49
openbravopg_defaultpublicc_orderc_order_client_org_date_docno79685494182550.45
openbravopg_defaultpublicm_productm_product_key11499941230494780.21
openbravopg_defaultpublicad_treenodead_treenode_tree_node_un666409224529480.21
openbravopg_defaultpublicprpass_pass_transprpass_pass_trans_inst5505978220975420.20
openbravopg_defaultpublicm_product_trlm_product_trl_product_langu_un21756314217857680.20
openbravopg_defaultpublicfin_payment_detailfin_payment_detail_key3717689142332040.13
openbravopg_defaultpublicfin_paymentfin_payment_key3717734142301880.13

Top indexes by blocks read

DBTablespaceSchemaTableIndexScansBlk Reads%TotalHits(%)
openbravopg_defaultpublicc_invoicec_invoice_client_org_date_doc9503861782960.8088.48
openbravopg_defaultpublicc_orderc_order_client_org_date_docno7968543969930.5791.10
openbravopg_defaultpublicc_invoicelinec_invoiceline_orderline5616722032922260.4398.54
openbravopg_defaultpublicm_inoutlinem_inoutline_orderline10069558931678600.4199.22
openbravopg_defaultpublicc_orderlineem_obpos_orderedqty4958376529744940.3998.51
openbravopg_defaultpublicfin_finacc_transactionfin_finacc_tr_account_line2196226253460.3465.61
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_product1879123418700.3062.96
openbravopg_defaultpublicprpass_pass_transprpass_pass_trans_inst550597815834440.2192.83
openbravopg_defaultpublicm_inoutm_inout_key5505699315729640.2099.29
openbravopg_defaultpublicc_invoicec_invoice_key5610094312437540.1699.45
openbravopg_defaultpublicc_orderc_order_key589289029047530.1299.62
openbravopg_defaultpublicfact_acctfact_acct_table_record_id1186127045800.0999.47
openbravopg_defaultpublicc_orderlinetaxc_orderlinetax_derline_tax_un406456050.0860.04
openbravopg_defaultpublicc_orderc_order_documentno_id45066207810.0857.40
openbravopg_defaultpublicc_orderlinec_orderline_key153696565870120.0899.04
openbravopg_defaultpublicc_ordertaxc_ordertax_order_tax_un9814029310.0560.21
openbravopg_defaultpublicfin_finacc_transactionfin_finacc_transaction_key475788693723880.0599.80
openbravopg_defaultpublicc_orderc_order_dateordered_id50343697060.0573.70
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_orderline137721302994400.0499.46
openbravopg_defaultpublicm_costingm_costing_product_date578172378120.0395.14

Top growing indexes

DBTablespaceSchemaTableIndexIndexTable
SizeGrowthInsUpdDel
openbravopg_defaultpublicfact_acctfact_acct_key2627 MB21 MB249849085537
openbravopg_defaultpublicfact_acctfact_acct_line_id2731 MB16 MB249619081537
openbravopg_defaultpublicfact_acctfact_acct_group2482 MB7312 kB241839027537
openbravopg_defaultpublicfact_acctfact_acct_record_id21691 MB7184 kB15417880347
openbravopg_defaultpublicc_orderlineem_obpos_orderedqty900 MB3776 kB10702171051
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_orderline786 MB2848 kB1003513598
openbravopg_defaultpublicc_invoiceem_aeatsii_inv_dua262 MB2608 kB2983907732
openbravopg_defaultpublicc_invoiceem_aeatsii_inv_purch_type261 MB2592 kB2969907182
openbravopg_defaultpublicc_invoicec_invoice_client_org_date_doc940 MB2448 kB50801022532
openbravopg_defaultpublicc_invoicec_invoice_bpartner632 MB2296 kB8774270
openbravopg_defaultpublicc_invoicec_invoice_key403 MB2072 kB50801022532
openbravopg_defaultpublicc_invoiceem_aeatsii_inv_acc_reg_date261 MB2000 kB5974182
openbravopg_defaultpublicm_inoutm_inout_order424 MB1872 kB32043360
openbravopg_defaultpublicc_orderlinec_orderline_product854 MB1016 kB6833113151
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_product767 MB1000 kB910612208
openbravopg_defaultpublicfin_finacc_transactionfin_finacc_tr_account_line395 MB784 kB382516281
openbravopg_defaultpublicm_inoutm_inout_key399 MB488 kB516154271
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_key727 MB448 kB26752426
openbravopg_defaultpublicc_orderc_order_dateordered_id501 MB352 kB37215833
openbravopg_defaultpublicad_audit_trailad_audit_trail_pk197 MB224 kB3475

Unused indexes

This table contains non-scanned indexes (during report period), ordered by number of DML operations on underlying tables. Constraint indexes are excluded.

DBTablespacesSchemaTableIndexIndexTable
SizeGrowthInsUpdDel
openbravopg_defaultpublicc_invoiceem_aeatsii_inv_dua262 MB2608 kB2983907732
openbravopg_defaultpublicc_invoiceem_aeatsii_inv_purch_type261 MB2592 kB2969907182
openbravopg_defaultpublicc_invoiceem_aeatsii_inv_acc_reg_date261 MB2000 kB5974182
openbravopg_defaultpg_catalogpg_classpg_class_tblspc_relfilenode_index320 kB9189
openbravopg_defaultpublicad_process_runad_process_run_ould_be_killed8192 bytes196196
openbravopg_defaultpublicc_filec_file_record_idx16 MB15

User function statistics

Top functions by total time

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopublicto_char7237058341262.321262.320.0000.000
openbravopubliccactl_calculate_consumption27821080.051079.410.3880.388
openbravopublicto_char673050008958.02958.020.0000.000
openbravopublicc_order_post1757296.180.050.1690.000
openbravopublicc_order_post11758296.1617.000.1680.010
openbravopublicc_order_post11757296.130.030.1690.000
openbravopublicad_extension_point_handler9720185.364.100.0190.000
openbravopubliccactl_ep_before_order_price624132.81132.750.2130.213
openbravopublicto_char218054333108.90108.900.0000.000
openbravopublicc_invoice_create146069.569.560.0480.007
openbravoprofiletake_sample2366.990.012.9130.000
openbravoprofiletake_sample_subset2366.980.142.9120.006
openbravoprofiletake_sample2366.843.282.9060.142
openbravopublicpricm_createproductprice411664.0831.520.0160.008
openbravoprofiledblink62155.4255.420.0890.089
openbravopublicc_invoice_post156654.1716.710.0350.011
openbravoprofilecollect_pg_stat_statements_stats2139.820.491.8960.024
openbravopublicto_date1364477935.0034.990.0000.000
openbravopublicm_inout_create120230.470.030.0250.000
openbravopublicm_inout_post158428.0314.950.0180.009

Top functions by executions

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopublicto_char7237058341262.321262.320.0000.000
openbravopublicto_char673050008958.02958.020.0000.000
openbravopublicto_char218054333108.90108.900.0000.000
openbravopublicto_char2717162314.6614.660.0000.000
openbravopublicto_date1364477935.0034.990.0000.000
openbravopublicto_number1262018720.7820.780.0000.000
openbravopublicsubstract_days25885732.032.030.0000.000
openbravopublicad_istriggerenabled199131912.5512.550.0000.000
openbravopublicad_isorgincluded181470520.3220.320.0000.000
openbravopublicadd_days16311102.102.100.0000.000
openbravopublicto_date10305372.262.260.0000.000
openbravopublicad_org_isinnaturaltree76974319.893.960.0000.000
openbravopublicuuid_generate_v46708992.462.460.0000.000
openbravopublicsubstract_days5586940.640.640.0000.000
openbravopublicget_uuid2236334.872.400.0000.000
openbravopublictrunc1513970.340.340.0000.000
openbravopublicround1160460.220.220.0000.000
openbravopublictrunc1123000.230.230.0000.000
openbravopublicobequals693920.290.290.0000.000
openbravopublicm_update_inventory6229214.7412.930.0000.000

Top trigger functions by total time

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopubliccactl_prod_g_prodboom_trg50586.461.220.1710.002
openbravopublicm_requisitionorder_trg24885.6785.640.3450.345
openbravopublicprres_prod_boom_allergens_trg566784.1131.330.0150.006
openbravopublicpricm_productprice416464.240.100.0150.000
openbravopublicprres_allergens_prod_trg952252.6652.470.0060.006
openbravopublicm_productionline_trg2794921.574.020.0010.000
openbravopubliccactl_m_prodline_losses_trg956613.483.030.0010.000
openbravopublicc_orderline_trg24266012.583.690.0000.000
openbravopublicau_c_order_trg2762911.1310.730.0000.000
openbravopublicm_transaction_trg5087710.835.980.0000.000
openbravopubliccactl_product_org274778.961.450.0000.000
openbravopublicc_invoiceline_trg2131818.963.170.0010.000
openbravopublicc_orderline2_trg426604.814.460.0000.000
openbravopublicc_invoice_trg1334674.763.950.0000.000
openbravopublicaeatsii_invoice_trg1334654.482.220.0000.000
openbravopublicpriuti_c_invoice_ref_trg1303703.162.470.0000.000
openbravopublicc_orderlinetax_trg137182.992.490.0000.000
openbravopublicc_invoice_trg21284092.901.680.0000.000
openbravopublicc_invoicelinetax_trg129772.771.830.0000.000
openbravopublicc_orderline_trg426602.472.180.0000.000

Vacuum-related statistics

Top tables by vacuum operations

DBTablespaceSchemaTableVacuum countAutovacuum countInsUpdDelUpd(HOT)
openbravopg_defaultpublicad_ep_instance_para6024398043980
openbravopg_defaultprofilelast_stat_tables1524140736644140440
openbravopg_defaultprofilelast_stat_indexes152707021549707021
openbravopg_defaultprofilelast_stat_user_functions1521242016031242090
openbravopg_defaultpublicm_stock_aux11616024401721602430622
openbravopg_defaultpublicc_import_entry101141161411714165
openbravopg_defaultpublicobpos_applications6675007419
openbravopg_defaultpublicad_sequence551471014555
openbravopg_defaultpublicfin_financial_account4337153710
openbravopg_defaultpublicobre_reservation3932119643185
openbravopg_defaultpublicobre_resource1222802221
openbravopg_defaultpg_catalogpg_class62401974124219736
openbravopg_defaultpublicm_transaction_last6213844
openbravopg_defaultpg_catalogpg_statistic22823726759
openbravopg_defaultpublicm_storage_detail2146331442394
openbravopg_defaultprofilelast_stat_database28888
openbravopg_defaultpg_catalogpg_type1406398
openbravopg_defaultpg_catalogpg_attribute119101860
openbravopg_defaultpublicad_alert1118
openbravopg_defaultpublicad_pinstance192518509681696

Top tables by analyze operations

DBTablespaceSchemaTableAnalyze countAutoanalyze countInsUpdDelUpd(HOT)
openbravopg_defaultpublicad_ep_instance_para7434398043980
openbravopg_defaultpublicm_stock_aux18916024401721602430622
openbravopg_defaultpublicc_import_entry174141161411714165
openbravopg_defaultpublicad_sequence1361471014555
openbravopg_defaultpublicobpos_applications9375007419
openbravopg_defaultprofilelast_stat_tables46234140736644140440
openbravopg_defaultprofilelast_stat_indexes4623707021549707021
openbravopg_defaultprofilelast_stat_user_functions46231242016031242090
openbravopg_defaultpublicfin_financial_account5037153710
openbravopg_defaultpublicobre_reservation4532119643185
openbravopg_defaultpublicobre_resource2322802221
openbravopg_defaultprofilelast_stat_tablespaces224242
openbravopg_defaultpg_catalogpg_class192401974124219736
openbravopg_defaultpublicad_session171731250111941
openbravopg_defaultpublicm_storage_detail12146331442394
openbravopg_defaultpublicm_transaction_last10213844
openbravopg_defaultpublicc_bpartner8271717084
openbravopg_defaultpublicad_process_request146155230523
openbravopg_defaultpg_catalogpg_type4406398
openbravopg_defaultpublicad_pinstance1392518509681696

Top indexes by estimated vacuum load

DBTablespaceSchemaTableIndex~Vacuum bytesVacuum cntAutovacuum cntIX sizeRelsize
openbravopg_defaultpublicm_stock_auxm_stock_aux_aux_id288 MB1162544 kB4400 kB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_timestamp285 MB1285 MB1385 MB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_pk241 MB1241 MB1385 MB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_cache209 MB1209 MB1385 MB
openbravopg_defaultpublicad_ep_instance_paraad_ep_instance_para_key202 MB602344 kB34 kB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_term_date202 MB1202 MB1385 MB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_context185 MB1185 MB1385 MB
openbravopg_defaultpublicc_import_entryem_prres_organization_idx137 MB1011384 kB1564 kB
openbravopg_defaultpublicc_import_entryc_import_entry_key94 MB101952 kB1564 kB
openbravopg_defaultpublicc_import_entryem_prres_typeofdata_idx89 MB101904 kB1564 kB
openbravopg_defaultpublicc_import_entryc_import_entry_type_status84 MB101856 kB1564 kB
openbravopg_defaultpublicm_stock_auxm_stock_aux_storage_detail_id82 MB116728 kB4400 kB
openbravopg_defaultpublicc_import_entryem_obpos_application_fk77 MB101784 kB1564 kB
openbravopg_defaultprofilelast_stat_indexespk_last_stat_indexes77 MB149528 kB2032 kB
openbravopg_defaultpublicm_stock_auxm_stock_aux_key70 MB116616 kB4400 kB
openbravopg_defaultpublicc_import_entryc_import_entry_idx67 MB101680 kB1564 kB
openbravopg_defaultprofilelast_stat_tablespk_last_stat_tables42 MB146296 kB1550 kB
openbravopg_defaultpublicm_storage_detailm_storage_detail_un40 MB220 MB29 MB
openbravopg_defaultpublicm_storage_detailm_storage_detail_uom28 MB214 MB29 MB
openbravopg_defaultpublicm_storage_detailm_storage_detail_locator25 MB213 MB29 MB

Top tables by dead tuples ratio

Data in this section is not differential. This data is valid for last report sample only.

DBSchemaTableLiveDead%DeadLast AVSize
openbravopg_toastpg_toast_26192468390132026-07-13 16:45:15.24715+017288 kB
openbravopg_toastpg_toast_232469134711764112026-05-19 02:38:47.391039+0129 MB
openbravopublicm_product15665166992026-02-20 19:44:18.669967+0010136 kB
openbravopg_catalogpg_statistic1072897882026-07-13 19:01:32.713114+017008 kB
openbravopublicfin_finacc_transaction659718663495882026-04-02 14:41:49.577329+013414 MB
openbravopublicc_order726947764922887722 MB
openbravopublicc_invoice701608957591572026-07-08 00:23:08.546646+017098 MB
openbravopublicm_requisitionline3178912660872026-07-06 12:22:50.3815+01184 MB
openbravoprofilesample_stat_tables27447221172026-07-13 12:00:12.182246+018656 kB
openbravopublicfact_acct37961727273939362025-07-31 23:28:10.407953+0131 GB
openbravopg_catalogpg_attribute37181212052026-07-13 12:23:12.748321+016776 kB
openbravopublicad_process_run21449123252026-06-01 11:38:18.108022+0122 MB
openbravopublicc_orderline1438085670721048625 MB
openbravopublicprpass_pass_inst1310748560041246257 MB
openbravopublicm_inout724343823439032025-10-20 23:54:32.431835+014152 MB
openbravopublicfin_payment_schedule1414372942047425088 MB
openbravopublicm_production1540381455072495 MB
openbravopg_toastpg_toast_22785620323012026-06-29 05:14:25.739162+016104 kB
openbravopublicprges_records704349631103 MB
openbravopublicad_audit_trail2100542840528 MB

Top tables by modified tuples ratio

Table shows modified tuples statistics since last analyze.

Data in this section is not differential. This data is valid for last report sample only.

DBSchemaTableLiveDeadMod%ModLast AASize
openbravopg_catalogpg_statistic107289789674343826447008 kB
openbravopublicprges_records70434963655492026-03-31 15:00:51.685568+01103 MB
openbravopublicprpass_pass_inst13107485600412114765682026-04-13 09:36:44.580373+016257 MB
openbravopublicad_audit_trail21005428416289272026-06-21 20:32:38.637677+01528 MB
openbravopublicfin_payment_schedule14143729420474103247072026-04-22 11:37:34.369148+015088 MB
openbravopublicm_production15403814550711836672026-04-24 10:39:04.707798+01495 MB
openbravopublicc_invoice701608957591543431552026-07-10 16:34:36.965521+017098 MB
openbravopublicm_requisitionline317891266081968952026-07-12 13:22:28.736582+01184 MB
openbravopublicfin_finacc_transaction659718663495829277742026-06-27 12:53:00.341557+013414 MB
openbravopublicc_order726947764922833151342026-06-29 09:41:55.68684+017722 MB
openbravoprofilesample_stat_tables274472211122042026-07-13 22:00:34.744945+018656 kB
openbravopublicc_file268258185868132026-02-09 12:48:30.95508+0096 MB
openbravopublicc_invoiceline142197794618155985332026-02-28 09:04:55.209925+007405 MB
openbravopublicc_invoicelinetax142658783419754626032026-03-02 14:36:24.388275+004696 MB
openbravopublicc_orderlinetax143666702901755248032026-03-03 11:11:52.370698+004728 MB
openbravopublicm_inoutline142216082704353523332026-03-06 11:59:32.517041+005960 MB
openbravopublicfact_acct37961727273939385280122026-06-25 13:36:17.490096+0131 GB
openbravopublicm_productionplan3446165959663222026-02-28 13:31:59.297829+001238 MB
openbravopublicprpass_pass_trans14717447538306322026-04-04 15:01:28.751084+015141 MB
openbravopublicm_product15665166949722026-07-13 10:43:57.196489+0110136 kB

Cluster settings during the report interval

Defined settings
Settingreset_valUnitSourceNotes
archive_command/bin/true/var/lib/postgresql/10/main/postgresql.auto.conf:3
archive_modeon/etc/postgresql/10/main/postgresql.conf:217
checkpoint_completion_target0.9/etc/postgresql/10/main/postgresql.conf:211
client_encodingUTF8
cluster_name10/main/etc/postgresql/10/main/postgresql.conf:477
config_file/etc/postgresql/10/main/postgresql.conf
data_checksumson
data_directory/var/lib/postgresql/10/main
DateStyleISO, DMY/etc/postgresql/10/main/postgresql.conf:566
default_text_search_configpg_catalog.spanish/etc/postgresql/10/main/postgresql.conf:588
effective_cache_size110100488kB/etc/postgresql/10/main/postgresql.conf:315
effective_io_concurrency200/etc/postgresql/10/main/postgresql.conf:164
external_pid_file/var/run/postgresql/10-main.pid/etc/postgresql/10/main/postgresql.conf:49
hba_file/etc/postgresql/10/main/pg_hba.conf
ident_file/etc/postgresql/10/main/pg_ident.conf
lc_collatees_ES.UTF-8
lc_ctypees_ES.UTF-8
lc_messagesen_US.UTF-8/etc/postgresql/10/main/conf.d/09-pgbadger.conf:11
lc_monetaryes_ES.UTF-8/etc/postgresql/10/main/postgresql.conf:583
lc_numericen_US.UTF-8/etc/postgresql/10/main/conf.d/01-openbravo-standard-postgres10.conf:38
lc_timees_ES.UTF-8/etc/postgresql/10/main/postgresql.conf:585
listen_addresses*/etc/postgresql/10/main/postgresql.conf:59
log_autovacuum_min_duration0ms/etc/postgresql/10/main/conf.d/09-pgbadger.conf:10
log_checkpointson/etc/postgresql/10/main/conf.d/09-pgbadger.conf:1
log_connectionson/etc/postgresql/10/main/conf.d/09-pgbadger.conf:2
log_disconnectionson/etc/postgresql/10/main/conf.d/09-pgbadger.conf:3
log_line_prefix%t [%p]:[%l-1] db=%d,user=%u,app=%a,client=%h/etc/postgresql/10/main/conf.d/09-pgbadger.conf:5
log_lock_waitson/etc/postgresql/10/main/conf.d/09-pgbadger.conf:6
log_min_duration_statement5000ms/etc/postgresql/10/main/conf.d/01-openbravo-standard-postgres10.conf:35
log_temp_files0kB/etc/postgresql/10/main/conf.d/09-pgbadger.conf:8
log_timezonelocaltime/etc/postgresql/10/main/conf.d/01-openbravo-standard-postgres10.conf:22
maintenance_work_mem2097152kB/etc/postgresql/10/main/postgresql.conf:123
max_connections500/etc/postgresql/10/main/postgresql.conf:64
max_locks_per_transaction128/etc/postgresql/10/main/conf.d/01-openbravo-standard-postgres10.conf:17
max_parallel_workers16/etc/postgresql/10/main/postgresql.conf:167
max_parallel_workers_per_gather4/etc/postgresql/10/main/postgresql.conf:166
max_stack_depth2048kB
max_standby_streaming_delay10800000ms/etc/postgresql/10/main/postgresql.conf:264
max_wal_size57344MB/etc/postgresql/10/main/postgresql.conf:209
max_worker_processes16/etc/postgresql/10/main/postgresql.conf:165
min_wal_size1024MB/etc/postgresql/10/main/postgresql.conf:210
pg_conf_load_time2026-05-19 04:01:11.408995+01
pg_postmaster_start_time2026-05-19 04:01:11.687059+01
pg_stat_statements.max10000/etc/postgresql/10/main/postgresql.conf:660
pg_stat_statements.trackall/etc/postgresql/10/main/postgresql.conf:661
random_page_cost1.1/etc/postgresql/10/main/postgresql.conf:307
server_encodingUTF8
shared_buffers36700168kB/etc/postgresql/10/main/postgresql.conf:113
shared_preload_libraries$libdir/pg_stat_statements/etc/postgresql/10/main/postgresql.conf:659
sslon/etc/postgresql/10/main/postgresql.conf:79
ssl_cert_file/etc/ssl/certs/ssl-cert-snakeoil.pem/etc/postgresql/10/main/postgresql.conf:84
ssl_key_file/etc/ssl/private/ssl-cert-snakeoil.key/etc/postgresql/10/main/postgresql.conf:85
stats_temp_directory/var/run/postgresql/10-main.pg_stat_tmp/etc/postgresql/10/main/postgresql.conf:493
TimeZonelocaltime/etc/postgresql/10/main/conf.d/01-openbravo-standard-postgres10.conf:23
timezone_abbreviationsDefault
track_functionsall/etc/postgresql/10/main/conf.d/09-pgbadger.conf:9
versionPostgreSQL 10.23 (Ubuntu 10.23-0ubuntu0.18.04.2) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
wal_buffers20488kB/etc/postgresql/10/main/postgresql.conf:198
wal_keep_segments2500/etc/postgresql/10/main/postgresql.conf:237
wal_receiver_timeout601000ms/etc/postgresql/10/main/postgresql.conf:271
wal_sender_timeout0ms/etc/postgresql/10/main/postgresql.conf:238
work_mem36700kB/etc/postgresql/10/main/postgresql.conf:122
Default settings
Settingreset_valUnitSourceNotes
allow_in_place_tablespacesoff
allow_system_table_modsoff
application_name
archive_timeout0s
array_nullson
authentication_timeout60s
autovacuumon
autovacuum_analyze_scale_factor0.1
autovacuum_analyze_threshold50
autovacuum_freeze_max_age200000000
autovacuum_max_workers3
autovacuum_multixact_freeze_max_age400000000
autovacuum_naptime60s
autovacuum_vacuum_cost_delay20ms
autovacuum_vacuum_cost_limit-1
autovacuum_vacuum_scale_factor0.2
autovacuum_vacuum_threshold50
autovacuum_work_mem-1kB
backend_flush_after08kB
backslash_quotesafe_encoding
bgwriter_delay200ms
bgwriter_flush_after648kB
bgwriter_lru_maxpages100
bgwriter_lru_multiplier2
block_size8192
bonjouroff
bonjour_name
bytea_outputhex
check_function_bodieson
checkpoint_flush_after328kB
checkpoint_timeout300s
checkpoint_warning30s
client_min_messagesnotice
commit_delay0
commit_siblings5
constraint_exclusionpartition
cpu_index_tuple_cost0.005
cpu_operator_cost0.0025
cpu_tuple_cost0.01
cursor_tuple_fraction0.1
data_sync_retryoff
db_user_namespaceoff
deadlock_timeout1000ms
debug_assertionsoff
debug_pretty_printon
debug_print_parseoff
debug_print_planoff
debug_print_rewrittenoff
default_statistics_target100/etc/postgresql/10/main/postgresql.conf:329
default_tablespace
default_transaction_deferrableoff
default_transaction_isolationread committed
default_transaction_read_onlyoff
default_with_oidsoff
dynamic_library_path$libdir
dynamic_shared_memory_typeposix/etc/postgresql/10/main/postgresql.conf:127
enable_bitmapscanon
enable_gathermergeon
enable_hashaggon
enable_hashjoinon
enable_indexonlyscanon
enable_indexscanon
enable_materialon
enable_mergejoinon
enable_nestloopon
enable_seqscanon
enable_sorton
enable_tidscanon
escape_string_warningon
event_sourcePostgreSQL
exit_on_erroroff
extra_float_digits0
force_parallel_modeoff
from_collapse_limit8
fsyncon
full_page_writeson
geqoon
geqo_effort5
geqo_generations0
geqo_pool_size0
geqo_seed0
geqo_selection_bias2
geqo_threshold12
gin_fuzzy_search_limit0
gin_pending_list_limit4096kB
hot_standbyon/etc/postgresql/10/main/postgresql.conf:259
hot_standby_feedbackoff
huge_pagestry
idle_in_transaction_session_timeout0ms
ignore_checksum_failureoff
ignore_system_indexesoff
integer_datetimeson
IntervalStylepostgres
join_collapse_limit8
krb_caseins_usersoff
krb_server_keyfileFILE:/etc/postgresql-common/krb5.keytab
local_preload_libraries
lock_timeout0ms
lo_compat_privilegesoff
log_destinationstderr
log_directorylog
log_durationoff/etc/postgresql/10/main/conf.d/09-pgbadger.conf:4
log_error_verbositydefault
log_executor_statsoff
log_file_mode384
log_filenamepostgresql-%Y-%m-%d_%H%M%S.log
logging_collectoroff
log_hostnameoff
log_min_error_statementerror
log_min_messageswarning
log_parser_statsoff
log_planner_statsoff
log_replication_commandsoff
log_rotation_age1440min
log_rotation_size10240kB
log_statementnone/etc/postgresql/10/main/conf.d/09-pgbadger.conf:7
log_statement_statsoff
log_truncate_on_rotationoff
max_files_per_process1000
max_function_args100
max_identifier_length63
max_index_keys32
max_logical_replication_workers4
max_pred_locks_per_page2
max_pred_locks_per_relation-2
max_pred_locks_per_transaction64
max_prepared_transactions0
max_replication_slots10
max_standby_archive_delay30000ms
max_sync_workers_per_subscription2
max_wal_senders10/etc/postgresql/10/main/postgresql.conf:235
min_parallel_index_scan_size648kB
min_parallel_table_scan_size10248kB
old_snapshot_threshold-1min
operator_precedence_warningoff
parallel_setup_cost1000
parallel_tuple_cost0.1
password_encryptionmd5
pg_profile.topn20
pg_stat_statements.saveon
pg_stat_statements.track_utilityon
port5432/etc/postgresql/10/main/postgresql.conf:63
post_auth_delay0s
pre_auth_delay0s
quote_all_identifiersoff
replacement_sort_tuples150000
restart_after_crashon
row_securityon
search_path"$user", public
segment_size1310728kB
seq_page_cost1
server_version10.23 (Ubuntu 10.23-0ubuntu0.18.04.2)
server_version_num100023
session_preload_libraries
session_replication_roleorigin
ssl_ca_file
ssl_ciphersHIGH:MEDIUM:+3DES:!aNULL
ssl_crl_file
ssl_dh_params_file
ssl_ecdh_curveprime256v1
ssl_prefer_server_cipherson
standard_conforming_stringson
statement_timeout0ms
superuser_reserved_connections3
synchronize_seqscanson
synchronous_commiton
synchronous_standby_names
syslog_facilitylocal0
syslog_identpostgres
syslog_sequence_numberson
syslog_split_messageson
system_identifier7195940715332384199
tcp_keepalives_count0
tcp_keepalives_idle0s
tcp_keepalives_interval0s
temp_buffers10248kB
temp_file_limit-1kB
temp_tablespaces
trace_notifyoff
trace_recovery_messageslog
trace_sortoff
track_activitieson
track_activity_query_size1024
track_commit_timestampoff
track_countson
track_io_timingoff
transaction_deferrableoff
transaction_isolationdefault
transaction_read_onlyoff
transform_null_equalsoff
unix_socket_directories/var/run/postgresql/etc/postgresql/10/main/postgresql.conf:66
unix_socket_group
unix_socket_permissions511
update_process_titleon
vacuum_cost_delay0ms
vacuum_cost_limit200
vacuum_cost_page_dirty20
vacuum_cost_page_hit1
vacuum_cost_page_miss10
vacuum_defer_cleanup_age0
vacuum_freeze_min_age50000000
vacuum_freeze_table_age150000000
vacuum_multixact_freeze_min_age5000000
vacuum_multixact_freeze_table_age150000000
wal_block_size8192
wal_compressionoff
wal_consistency_checking
wal_levelreplica/etc/postgresql/10/main/postgresql.conf:180
wal_log_hintsoff
wal_receiver_status_interval10s
wal_retrieve_retry_interval5000ms
wal_segment_size20488kB
wal_sync_methodfdatasync
wal_writer_delay200ms
wal_writer_flush_after1288kB
xmlbinarybase64
xmloptioncontent
zero_damaged_pagesoff