Postgres profile report (StartID: 381, EndID: 404)

pg_profile version 0.3.6

Server name: local

Report interval: 2026-07-15 04:00:02+01 - 2026-07-16 03:00:02+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
openbravo1154063611796.0835261780086437970362234662958184597092609625176274717218225928 MB167290 GB403 MB
postgres1170799.165562652884190516134833676391 kB
Total1165770611796.0835262336286444499202234853474284600575969625176274787218225928 MB167290 GB403 MB

Statement statistics by database

DatabaseCallsTime (s)Fetched (blk)Dirtied (blk)Temp (blk)Local (blk)Statements
ExecReadWriteTrgSharedLocalSharedLocalReadWriteReadWrite
openbravo1714205627343.87214.8592711922402653567723126622070545635759006231459480
postgres56128.7086741345
template163488.637176276
Total1715401627361.19214.8592712861572653567723126622070545635759006231460101

Cluster statistics

MetricValue
Scheduled checkpoints276
Requested checkpoints
Checkpoint write time (s)48200.81
Checkpoint sync time (s)23.57
Checkpoints buffers written1075795
Background buffers written470525
Backend buffers written202667
Backend fsync count
Bgwriter interrupts (too many buffers)2859
Number of buffers allocated166155361
WAL generated10 GB
WAL segments archived665
WAL segments archive failed

Tablespace statistics

TablespacePathSizeGrowth
pg_default290 GB403 MB
pg_global1014 kB

SQL query statistics

Top SQL by execution time

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

9918228dba

[9603f2b6]

openbravo2720.959.94101221608.986257.538865.77830.8424468

4aae53f3da

[5b93a467]

openbravo2712.099.9119652.82416507.02472268.7927092.025138

b76ef6c915

[84cd185c]

openbravo1754.666.41154823395.4356529.571122865.01025178.16375

6aeca8addc

[e0869ab2]

openbravo1211.374.438778.0517650.66413246.2471497.657138

4a3e0e1397

[4f62fc29]

openbravo1189.224.3544045.12442601.85546281.078998.20627

189e272f54

[d917b591]

openbravo963.503.5249443795.33042647.53445225.512593.85722

6e47e0b2e7

[c4153bc0]

openbravo796.022.9130996911985.075207.5476843.3881283.426401

60ced86ccb

[e11c57bb]

openbravo733.162.6843127.29041224.76045175.2501013.78917

66933eedde

[a6742d25]

openbravo723.732.65117944411.9390.0232200.60718.01160618

416d959161

[fb2a3095]

openbravo599.392.194757.0264256.09817048.4961183.398126

59ed037ff5

[f51c7e38]

openbravo378.901.38119219941.9096899.51650823.56315467.77919

ec8c626e99

[cd9c0fd2]

openbravo362.281.326060362275.391362275.391362275.3911

67a75a3409

[7318d810]

openbravo349.551.2838003019349545.627349545.627349545.6271

bde1a48003

[7d7d1050]

openbravo349.501.28409854.530681.13014597.254869.208409

c180ac6f1a

[2266d068]

openbravo270.510.9911432129.98922.31729860.5794441.904127

a9174bed1c

[daf1066c]

openbravo237.230.87967245.32825.2216072.678546.261967

e4b8f19235

[464f8019]

openbravo202.930.74336149.2595792.4106964.767260.95633

88a5ad3dfa

[9dd2baff]

openbravo202.200.745013480.3036313.15641123.47513725.42915

c17924c407

[bae859d8]

openbravo192.310.7013351282.09322.08514005.9443015.070150

03d9123317

[94eb716f]

openbravo185.230.681566615.3504397.96211289.7201522.84428

Top SQL by executions

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

9a0540688d

[263f5b0b]

openbravo11640626.796027120.0030.00111.0230.0112.9

b280347c9b

[fc9c6197]

openbravo10591106.1710591100.0100.0088.2980.01010.8

10410964a2

[6df21622]

openbravo6676413.896676410.0030.0021.3700.0042.0

a46753d96b

[d2788d4]

openbravo5974673.485974670.0030.0011.0720.0041.7

7247cdc8b5

[aada7118]

openbravo3334831.94121320.0100.00311.6080.0313.3

1b89da5cec

[6f9b1a85]

openbravo2972721.730.0010.0000.2450.0010.2

8a7672d920

[2049516b]

openbravo2929161.710.0010.0000.8830.0020.2

03a1d4e90c

[1c1c8a81]

openbravo1995161.161995160.0030.0020.7980.0040.6

784dd58a53

[c7e884e0]

openbravo1866671.091866670.0040.0020.8520.0040.7

08c88cedcc

[6d0d7fc]

openbravo1851981.081851980.0050.0020.9400.0051.0

f2e5c3fd88

[2b8e321f]

openbravo1836911.071836910.0060.0039.4650.0231.1

2bbd1014ed

[d9433e44]

openbravo1707151.001707150.0030.0020.7960.0030.5

b93f3a3e02

[30f21dca]

openbravo1449920.851449920.2570.2048.5570.07137.2

ab6445a3b6

[a5716dbe]

openbravo1449920.851449920.2340.2045.3880.05833.9

281ee3922a

[5d6197e1]

openbravo1318300.771317180.0070.0041.0160.0060.9

59de48c20b

[3081048d]

openbravo1134790.661134790.0040.0020.3960.0030.5

b9a73dbea9

[2b7ebfcc]

openbravo1106590.651106590.0100.0071.5710.0081.1

1fbcf388f5

[588b10e0]

openbravo1034110.600.0020.0010.4170.0020.2

10f4e6f2bf

[413ce6da]

openbravo981460.57981460.0200.0060.6480.0122.0

943d79be4b

[b86e6a95]

openbravo860210.50860210.0020.0011.0580.0040.1

Top SQL by shared blocks fetched

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

4aae53f3da

[5b93a467]

openbravo148537675316.0294.942712.1138

66933eedde

[a6742d25]

openbravo8909548519.6199.92723.7117944460618

6aeca8addc

[e0869ab2]

openbravo6606570977.1397.771211.4138

6e47e0b2e7

[c4153bc0]

openbravo3380332873.6595.83796.03099691401

bde1a48003

[7d7d1050]

openbravo3148888923.4099.63349.5409409

b76ef6c915

[84cd185c]

openbravo2572053122.7799.051754.7154875

c180ac6f1a

[2266d068]

openbravo2149493762.3299.66270.51143127

e4b8f19235

[464f8019]

openbravo2023079242.1899.92202.93333

03d9123317

[94eb716f]

openbravo1765422701.9098.60185.215628

4a3e0e1397

[4f62fc29]

openbravo1655262871.79100.001189.227

c17924c407

[bae859d8]

openbravo1594922431.7298.26192.31335150

974abe8643

[59f8fe6c]

openbravo1290297591.3999.98166.53218

416d959161

[fb2a3095]

openbravo1249710791.3564.20599.4126

6856866d41

[d9c82a48]

openbravo1146609791.2499.57151.91717

60ced86ccb

[e11c57bb]

openbravo1146506831.2499.86733.217

b4d6b6665e

[72db11e8]

openbravo1107458311.1982.06172.0138

475c41a119

[c20f80e1]

openbravo1011525141.09100.00124.01515

b99cde50b0

[980edddc]

openbravo981173401.0697.21110.51616

59ed037ff5

[f51c7e38]

openbravo949142991.0298.58378.9119219

20bf60e95d

[c21a81d2]

openbravo858493000.9396.88101.01414

Top SQL by shared blocks read

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

4aae53f3da

[5b93a467]

openbravo7516787320.4594.942712.1138

416d959161

[fb2a3095]

openbravo4474084912.1764.20599.4126

fa1f738bce

[4960efab]

openbravo251902566.855.0737.92424

6bc28a65f9

[5494e49a]

openbravo251387936.845.2628.92424

b4d6b6665e

[72db11e8]

openbravo198728365.4182.06172.0138

6aeca8addc

[e0869ab2]

openbravo147333594.0197.771211.4138

6e47e0b2e7

[c4153bc0]

openbravo141114403.8495.83796.03099691401

33ff47c769

[6fed39e5]

openbravo84997162.313.909.588

6fe43f5091

[94a66f88]

openbravo84984362.313.929.688

22615c404b

[c1020a32]

openbravo47973401.3165.95162.861

6a1bba66a2

[131a43ac]

openbravo42371271.154.194.744

096068c9bd

[d5f8441b]

openbravo42251221.154.464.844

c08aa6fa9c

[6f1088e2]

openbravo40091841.090.0227.51

92e90f4e36

[70f21dd7]

openbravo40091711.090.0027.51

67a75a3409

[7318d810]

openbravo40091701.090.00349.5380030191

40adad5304

[ac0831d]

openbravo32275920.8824.8238.488

f159d14bd9

[186741ec]

openbravo29053070.7993.8565.977

c17924c407

[bae859d8]

openbravo27790330.7698.26192.31335150

b99cde50b0

[980edddc]

openbravo27388160.7597.21110.51616

6c5811c9a5

[f2f47190]

openbravo27280750.7495.5181.899

Top SQL by shared blocks dirtied

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

d545a87b3d

[a03a69a5]

openbravo2170569.3997.5731.85718957189

6758866a26

[eb67e33f]

openbravo1101684.7694.3623.17319973199

8d75ee1767

[3695269c]

openbravo890243.8595.9519.52011220112

7efafc5af2

[74267a2]

openbravo784123.3992.60179.814811481

ff35139986

[a35d3b99]

openbravo784123.3992.61179.914811481

4cb9cc1cbf

[ea4e56b9]

openbravo784123.3992.60179.814811481

101ed24576

[205b8c88]

openbravo528082.2898.458.21584015840

2c756b6487

[4211bbca]

openbravo493092.1340.008.21

43a80059e4

[bfd8039a]

openbravo358201.5599.1954.012111211

974abe8643

[59f8fe6c]

openbravo352021.5299.98166.53218

fec93ea334

[2ff59f28]

openbravo331121.4399.435.95156751567

e1739d379d

[6f92ba97]

openbravo322591.3910.4887.770191541

7cdb887c2a

[8f1d721]

openbravo259341.1299.3817.256195619

d3471812de

[aa92e059]

openbravo256631.1196.3255.577

320ed06a6d

[41b729f2]

openbravo245811.0695.643.856855685

26959f7c7a

[d3eb78]

openbravo243791.0589.946.41188611886

86ae00e408

[12018251]

openbravo221190.9685.374.660906090

2c52c242a6

[4282957f]

openbravo207680.9095.596.91744417444

1b416379ea

[97b6b91a]

openbravo201140.8794.883.357775777

fe49fa204f

[3ef02a9d]

openbravo194500.8497.153.196919691

Top SQL by shared blocks written

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

2c756b6487

[4211bbca]

openbravo375072.1418.5140.008.21

b4d6b6665e

[72db11e8]

openbravo229751.3111.3482.06172.0138

2ce9536368

[76ede534]

openbravo162930.938.0452.822.61

98d4183d4b

[6ee18a4d]

openbravo128310.736.3345.970.61

6aeca8addc

[e0869ab2]

openbravo119890.695.9297.771211.4138

20bf60e95d

[c21a81d2]

openbravo88330.514.3696.88101.01414

6e47e0b2e7

[c4153bc0]

openbravo46610.272.3095.83796.03099691401

8b47e0efaf

[429b2ffc]

openbravo37550.211.8569.070.41

f159d14bd9

[186741ec]

openbravo27300.161.3593.8565.977

3a78d1820c

[b98cd3cc]

openbravo17120.100.8479.3432.699

4aae53f3da

[5b93a467]

openbravo13200.080.6594.942712.1138

6c5811c9a5

[f2f47190]

openbravo11970.070.5995.5181.899

62f93705d3

[f123ad5b]

openbravo11040.060.5460.917.811

b99cde50b0

[980edddc]

openbravo10840.060.5397.21110.51616

4b615bbcc3

[46baebc0]

openbravo7380.040.3683.4018.811

a9174bed1c

[daf1066c]

openbravo6700.040.3398.42237.2967967

59ed037ff5

[f51c7e38]

openbravo6700.040.3398.58378.9119219

8cbbd77293

[196d23a4]

openbravo5070.030.2591.8220.811

5a62f392ad

[1e5d1bbf]

openbravo4680.030.2392.320.31

82c30be2ca

[b8ecf334]

openbravo3500.020.175.315.411

Top SQL by temp usage

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

b76ef6c915

[84cd185c]

openbravo36851048.5536857067.551754.7154875

7e62f3b264

[6e3dad39]

openbravo14531119.145963110.9342.633813

8ec2df7b9d

[6e556c27]

openbravo8942211.78366966.7326.12088

ac7478aac8

[58a0d3d2]

openbravo468186.17146792.690.744

91f0089d3d

[bfef2e79]

openbravo251043.31251014.6018.2593

d3471812de

[aa92e059]

openbravo297713.92183683.3755.577

eaafc55d44

[b2dd73b6]

openbravo154072.0360.005.211

5c9cd00b05

[aba3845d]

openbravo75260.9945920.846.711

4dea79c24d

[d87869f1]

openbravo73630.9735560.6510.611

7b31b157d2

[b394259d]

openbravo48480.6448480.890.411

7871717022

[fbc81439]

openbravo48480.6448480.890.422

b524945fb7

[e4238259]

openbravo70340.9380.000.322

f6b9cfdb77

[c95b0f98]

openbravo35220.4623660.430.211

ce8d471f91

[fae9dfc5]

openbravo35220.4623660.430.211

12855dd66c

[6fbaf8c1]

openbravo7623299.1962126.840.37437874378

3ffe3bd941

[499c90f3]

openbravo483199.30341.470.047384738

08e4e555e9

[42fc2725]

openbravo722499.54331.430.071347134

13ec9b5ce6

[1f563790]

openbravo761599.62291.250.075307530

d195b700bc

[6a5e29af]

openbravo709299.59291.250.070147014

8af0c7ed0b

[b5a0c24e]

openbravo760899.62291.250.075287528

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)
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
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)
40adad5304select 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_BPartner businesspa1_ on materialmg0_.C_BPartner_ID=businesspa1_.C_BPartner_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 businesspa1_.Value desc, businesspa1_.Name desc, businesspa1_.TaxID desc, businesspa1_.Name2 desc, materialmg0_.M_InOut_ID desc limit $42
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
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)
6a1bba66a2SELECT COUNT(*) AS ID FROM C_OrderLine WHERE Replacedorderline_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 exists ( select $4 from C_DocType where C_DocType_ID = C_Order.C_DocTypeTarget_ID and isreturn=$5)) AND AD_ORG_ID NOT IN ($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,$43)
f159d14bd9select 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_.EM_Aeatsii_Fecha_Reg_Cont desc, invoice0_.C_Invoice_ID desc limit $41
8cbbd77293select 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_.GrandTotal desc, invoice0_.C_Invoice_ID desc limit $41
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
5a62f392advacuum analyze AD_PInstance
13ec9b5ce6insert into ad_context_info (ad_user_id, ad_session_id, processType, processId) values ($1, $2, $3, $4)
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
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
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)
59de48c20bSELECT $2 FROM ONLY "public"."c_bpartner_location" x WHERE "c_bpartner_location_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
b93f3a3e02select count(*) as y0_ from AD_TreeNode this_ where this_.Node_ID=$1 and this_.Parent_ID<>$2 and this_.IsActive=$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)
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))
8b47e0efafvacuum analyze M_Stock_Proposed
08e4e555e9insert into ad_context_info (ad_user_id, ad_session_id, processType, processId) values ($1, $2, $3, $4)
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
4b615bbcc3select pruti_stoc0_.Pruti_Stock_Detail_V_ID as Pruti_St1_938_0_, pruti_stoc0_.AD_Client_ID as AD_Clien2_938_0_, pruti_stoc0_.AD_Org_ID as AD_Org_I3_938_0_, pruti_stoc0_.Isactive as Isactive4_938_0_, pruti_stoc0_.Created as Created5_938_0_, pruti_stoc0_.Createdby as Createdb6_938_0_, pruti_stoc0_.Updated as Updated7_938_0_, pruti_stoc0_.Updatedby as Updatedb8_938_0_, pruti_stoc0_.Type as Type9_938_0_, pruti_stoc0_.M_Product_ID as M_Produ10_938_0_, pruti_stoc0_.Qty as Qty11_938_0_, pruti_stoc0_.M_Attributesetinstance_ID as M_Attri12_938_0_, pruti_stoc0_.M_Locator_ID as M_Locat13_938_0_, pruti_stoc0_.M_Warehouse_ID as M_Wareh14_938_0_ from pruti_stock_detail_v pruti_stoc0_ where pruti_stoc0_.Pruti_Stock_Detail_V_ID=$1
fa1f738bceSELECT COUNT(*) AS ID FROM C_OrderLine WHERE Replacedorderline_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)
3ffe3bd941insert into ad_context_info (ad_user_id, ad_session_id, processType, processId) values ($1, $2, $3, $4)
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
6bc28a65f9SELECT COUNT(*) AS ID FROM C_OrderLine WHERE Replacedorderline_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)
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
974abe8643select 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 C_BPartner businesspa1_ on invoice0_.C_BPartner_ID=businesspa1_.C_BPartner_ID where (upper(invoice0_.DocumentNo) like upper($1) escape $44) and (upper((businesspa1_.Value||$45||businesspa1_.Name||$46||coalesce(to_char(businesspa1_.TaxID), $47)||$48||coalesce(to_char(businesspa1_.Name2), $49))) like upper($2) escape $50) and invoice0_.IsSOTrx=$51 and invoice0_.DocStatus<>$52 and (invoice0_.AD_Org_ID 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)) and (invoice0_.AD_Client_ID in ($41 , $42)) order by invoice0_.C_Invoice_ID desc limit $43
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)
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
d195b700bcinsert into ad_context_info (ad_user_id, ad_session_id, processType, processId) values ($1, $2, $3, $4)
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
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
c08aa6fa9c-- END ALTER TABLE FACT_ACCT ADD CONSTRAINT FACT_ACCT_AD_TABLE FOREIGN KEY (AD_TABLE_ID) REFERENCES AD_TABLE (AD_TABLE_ID) ON DELETE CASCADE
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
12855dd66cinsert into ad_context_info (ad_user_id, ad_session_id, processType, processId) values ($1, $2, $3, $4)
33ff47c769SELECT COUNT(*) AS ID FROM C_OrderLine WHERE Replacedorderline_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)
92e90f4e36SELECT fk."ad_table_id" FROM ONLY "public"."fact_acct" fk LEFT OUTER JOIN ONLY "public"."ad_table" pk ON ( pk."ad_table_id"::pg_catalog.text OPERATOR(pg_catalog.=) fk."ad_table_id"::pg_catalog.text) WHERE pk."ad_table_id" IS NULL AND (fk."ad_table_id" IS NOT NULL)
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
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
6fe43f5091SELECT COUNT(*) AS ID FROM C_OrderLine WHERE Replacedorderline_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)
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)
b99cde50b0select 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_ inner join M_Warehouse warehouse1_ on order0_.M_Warehouse_ID=warehouse1_.M_Warehouse_ID cross join C_DocType documentty2_ where order0_.C_DocTypeTarget_ID=documentty2_.C_DocType_ID and order0_.IsSOTrx=$43 and documentty2_.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 warehouse1_.Name desc, order0_.C_Order_ID desc limit $42
88a5ad3dfaselect 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||$4||coalesce(to_char(order0_.DateOrdered), $5)||$6||coalesce(to_char(order0_.GrandTotal), $7))) like upper($1) escape $8) and (exists (select $9 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 ($10 , $11)) and materialmg1_.Islogistic=$12 and documentty3_.IsReturn=$13 and order2_.C_Order_ID=order0_.C_Order_ID and (materialmg1_.AD_Org_ID in ($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 , $51)) and (materialmg1_.AD_Client_ID in ($52 , $53)))) order by order0_.DocumentNo, order0_.DateOrdered, order0_.GrandTotal limit $2 offset $3
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
66933eeddeselect 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 CASE WHEN max(ptr.c_orderline_id) is not null THEN count(ppi.prpass_pass_inst_id) ELSE max(ptr.qtyreservation) END 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 (ppi.status <>$29 or ppi.status is null) and cart is not null group by cart ) as f), $30) 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 = $31 order by 2 asc) AS f
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='Initial' 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
eaafc55d44select 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_ 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 materialmg0_.MovementDate, materialmg0_.M_Transaction_ID 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
8af0c7ed0binsert into ad_context_info (ad_user_id, ad_session_id, processType, processId) values ($1, $2, $3, $4)
943d79be4bSELECT $4 FROM ONLY "profile"."last_stat_database" x WHERE "server_id" OPERATOR(pg_catalog.=) $1 AND "sample_id" OPERATOR(pg_catalog.=) $2 AND "datid" OPERATOR(pg_catalog.=) $3 FOR KEY SHARE OF x
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
3a78d1820cselect 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_BPartner businesspa1_ on materialmg0_.C_BPartner_ID=businesspa1_.C_BPartner_ID inner join C_Order order2_ on materialmg0_.C_Order_ID=order2_.C_Order_ID cross join C_DocType documentty3_ where materialmg0_.C_DocType_ID=documentty3_.C_DocType_ID and upper((order2_.DocumentNo||$44||coalesce(to_char(order2_.DateOrdered), $45)||$46||coalesce(to_char(order2_.GrandTotal), $47)))=upper($1) and (materialmg0_.MovementType in ($48 , $49)) and materialmg0_.Islogistic=$50 and documentty3_.IsReturn=$51 and (materialmg0_.Updated>$2 or materialmg0_.Processed=$52) and (materialmg0_.AD_Org_ID 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)) and (materialmg0_.AD_Client_ID in ($41 , $42)) order by businesspa1_.Value desc, businesspa1_.Name desc, businesspa1_.TaxID desc, businesspa1_.Name2 desc, materialmg0_.M_InOut_ID desc limit $43
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)
91f0089d3dselect 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_.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_.DateAcct, invoice0_.C_Invoice_ID limit $41 offset $42
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'
475c41a119select sum(invoice0_.OutstandingAmt) as col_0_0_, sum(invoice0_.Totalpaid) as col_1_0_ from C_Invoice invoice0_ where (upper(invoice0_.DocumentNo) like upper($1) escape $43) and invoice0_.IsSOTrx=$44 and invoice0_.DocStatus<>$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)) limit $42
20bf60e95dselect 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_.DocumentNo desc, order0_.C_Order_ID desc limit $42
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
f6b9cfdb77select c_import_e0_.C_Import_Entry_Archive_ID as C_Import1_258_, c_import_e0_.AD_Client_ID as AD_Clien2_258_, c_import_e0_.AD_Org_ID as AD_Org_I3_258_, c_import_e0_.Isactive as Isactive4_258_, c_import_e0_.Created as Created5_258_, c_import_e0_.Createdby as Createdb6_258_, c_import_e0_.Updated as Updated7_258_, c_import_e0_.Updatedby as Updatedb8_258_, c_import_e0_.Imported as Imported9_258_, c_import_e0_.Jsoninfo as Jsoninf10_258_, c_import_e0_.ImportStatus as ImportS11_258_, c_import_e0_.Typeofdata as Typeofd12_258_, c_import_e0_.Errorinfo as Errorin13_258_, c_import_e0_.AD_Role_ID as AD_Role14_258_, c_import_e0_.EM_Obpos_Applications_ID as EM_Obpo15_258_, c_import_e0_.Responseinfo as Respons16_258_ from C_Import_Entry_Archive c_import_e0_ where (c_import_e0_.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 (c_import_e0_.AD_Client_ID in ($39 , $40)) order by c_import_e0_.Created desc, c_import_e0_.C_Import_Entry_Archive_ID desc limit $41 offset $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
096068c9bdSELECT COUNT(*) AS ID FROM C_OrderLine WHERE Replacedorderline_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 exists ( select $4 from C_DocType where C_DocType_ID = C_Order.C_DocTypeTarget_ID and isreturn=$5)) AND AD_ORG_ID IN ($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,$43) AND AD_CLIENT_ID IN ($44)
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
189e272f54select 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 exists (select $3 from M_InOut materialmg1_ left outer join C_BPartner businesspa2_ on materialmg1_.C_BPartner_ID=businesspa2_.C_BPartner_ID inner join C_Order order3_ on materialmg1_.C_Order_ID=order3_.C_Order_ID where (upper((materialmg1_.DocumentNo||$4||coalesce(to_char(materialmg1_.MovementDate), $5)||$6||(businesspa2_.Value||$7||businesspa2_.Name||$8||coalesce(to_char(businesspa2_.TaxID), $9)||$10||coalesce(to_char(businesspa2_.Name2), $11)))) like upper($1) escape $12) and order3_.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
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
a9174bed1cWITH 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
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)
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
b524945fb7select c_import_e0_.C_Import_Entry_Archive_ID as C_Import1_258_, c_import_e0_.AD_Client_ID as AD_Clien2_258_, c_import_e0_.AD_Org_ID as AD_Org_I3_258_, c_import_e0_.Isactive as Isactive4_258_, c_import_e0_.Created as Created5_258_, c_import_e0_.Createdby as Createdb6_258_, c_import_e0_.Updated as Updated7_258_, c_import_e0_.Updatedby as Updatedb8_258_, c_import_e0_.Imported as Imported9_258_, c_import_e0_.Jsoninfo as Jsoninf10_258_, c_import_e0_.ImportStatus as ImportS11_258_, c_import_e0_.Typeofdata as Typeofd12_258_, c_import_e0_.Errorinfo as Errorin13_258_, c_import_e0_.AD_Role_ID as AD_Role14_258_, c_import_e0_.EM_Obpos_Applications_ID as EM_Obpo15_258_, c_import_e0_.Responseinfo as Respons16_258_ from C_Import_Entry_Archive c_import_e0_ where (c_import_e0_.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 (c_import_e0_.AD_Client_ID in ($39 , $40)) order by c_import_e0_.Created, c_import_e0_.C_Import_Entry_Archive_ID limit $41
4cb9cc1cbfSELECT C_ORDER_POST1($1, $2, $3)
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 )
62f93705d3select 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 ($42 , $43)) and materialmg0_.Islogistic=$44 and documentty2_.IsReturn=$45 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 order1_.DocumentNo desc, order1_.DateOrdered desc, order1_.GrandTotal desc, materialmg0_.M_InOut_ID desc limit $41
6c5811c9a5select 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_.DateAcct, invoice0_.C_Invoice_ID limit $41
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
ce8d471f91select c_import_e0_.C_Import_Entry_Archive_ID as C_Import1_258_, c_import_e0_.AD_Client_ID as AD_Clien2_258_, c_import_e0_.AD_Org_ID as AD_Org_I3_258_, c_import_e0_.Isactive as Isactive4_258_, c_import_e0_.Created as Created5_258_, c_import_e0_.Createdby as Createdb6_258_, c_import_e0_.Updated as Updated7_258_, c_import_e0_.Updatedby as Updatedb8_258_, c_import_e0_.Imported as Imported9_258_, c_import_e0_.Jsoninfo as Jsoninf10_258_, c_import_e0_.ImportStatus as ImportS11_258_, c_import_e0_.Typeofdata as Typeofd12_258_, c_import_e0_.Errorinfo as Errorin13_258_, c_import_e0_.AD_Role_ID as AD_Role14_258_, c_import_e0_.EM_Obpos_Applications_ID as EM_Obpo15_258_, c_import_e0_.Responseinfo as Respons16_258_ from C_Import_Entry_Archive c_import_e0_ where (c_import_e0_.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 (c_import_e0_.AD_Client_ID in ($39 , $40)) order by c_import_e0_.Created desc, c_import_e0_.C_Import_Entry_Archive_ID desc limit $41
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_defaultpublicprpass_pass_inst4348 GB7101350319210229811659555165183663
prpass_pass_inst(TOAST)
openbravopg_defaultpublicc_orderline3054 GB362635743591304663599264272191012212
c_orderline(TOAST)
openbravopg_defaultpublicc_order2669 GB353682605042740810236450218473510875
c_order(TOAST)
openbravopg_defaultpublicm_inout804 GB198607033636804012244551164216872
m_inout(TOAST)2492137504436
openbravopg_defaultpg_temp_13ad_context_info353 GB743987437774376
openbravopg_defaultpublicprpass_timeslots_res276 GB1091424344910085254672615152610912
prpass_timeslots_res(TOAST)
openbravopg_defaultpublicprges_records122 GB1216776911776911173624
prges_records(TOAST)261268362404
openbravopg_defaultpublicc_invoice97 GB145231670318393244244298118443321439
c_invoice(TOAST)
openbravopg_defaultpg_catalogpg_class59 GB44559206326419580605882496256923799
openbravopg_defaultpublicad_audit_trail44 GB841187063864902
ad_audit_trail(TOAST)
openbravopg_defaultpublicc_bpartner35 GB3338141993331602383859795974
c_bpartner(TOAST)
openbravopg_defaultpublicm_product33 GB33939221589102220663127
m_product(TOAST)
openbravopg_defaultpublicfact_acct31 GB135712252045201215262257
fact_acct(TOAST)
openbravopg_defaultpublicm_storage_detail26 GB945113799517745161354449237087
m_storage_detail(TOAST)
openbravopg_defaultpublicfin_payment23 GB68599614469529462044318159
fin_payment(TOAST)
openbravopg_defaultpublicad_column18 GB2396201712337096236960927
ad_column(TOAST)
openbravopg_defaultpublicad_table16 GB10506205523181321087434
ad_table(TOAST)
openbravopg_defaultpublicm_transaction13 GB1150551349367413639292051191
m_transaction(TOAST)
openbravopg_defaultpublicm_productionline7831 MB12839521973836581681614415346
m_productionline(TOAST)
openbravopg_defaultpublicc_invoiceline7410 MB1564767075281994888943246272521
c_invoiceline(TOAST)

Top tables by blocks fetched

DBTablespaceSchemaTableHeapIxTOASTTOAST-Ix
Blks%TotalBlks%TotalBlks%TotalBlks%Total
openbravopg_defaultpublicc_order258650952428.753195915203.55
openbravopg_defaultpublicc_invoice176079037319.572697075063.00
openbravopg_defaultpublicfin_finacc_transaction6807093737.57647039730.72
openbravopg_defaultpublicprpass_timeslots_res7057727597.84118621250.13
openbravopg_defaultpublicprpass_pass_inst4423242054.92622765310.69
openbravopg_defaultpublicc_orderline1740875981.942839826373.16
openbravopg_defaultpublicm_inout1737399131.932438378732.7153280.00619320.00
openbravopg_defaultpublicm_inoutline565542420.632293998412.55
openbravopg_defaultpublicc_invoiceline536358640.602268344382.52
openbravopg_defaultpublicm_costing830648980.9244583490.05
openbravopg_defaultpublicc_bpartner211004600.23315187190.35
openbravopg_defaultpublicm_product143932440.16188316280.21
openbravopg_defaultpublicad_treenode8896910.01233134640.26
openbravopg_defaultpg_temp_13ad_context_info232498300.26
openbravopg_defaultpublicprges_records167759580.1923415650.032684920.002612860.00
openbravopg_defaultpublicm_transaction43166940.05101166000.11
openbravopg_defaultpublicm_productionline56870630.0686640390.10
openbravopg_defaultpg_catalogpg_class92623870.1041661860.05
openbravopg_defaultpublicprpass_pass_trans7299480.01117704110.13
openbravopg_defaultpublicc_doctype50135800.0649710530.06

Top tables by blocks read

DBTablespaceSchemaTableHeapIxTOASTTOAST-IxHit(%)
Blks%TotalBlks%TotalBlks%TotalBlks%Total
openbravopg_defaultpublicc_order11045097331.3268598781.9595.96
openbravopg_defaultpublicc_orderline8481082924.0536220361.0380.69
openbravopg_defaultpublicprpass_pass_inst323055709.1630904750.8892.99
openbravopg_defaultpublicc_invoice203677475.7867889671.9398.66
openbravopg_defaultpublicm_inout140595993.9917041150.4833900.009600.0096.22
openbravopg_defaultpublicfin_finacc_transaction127949913.6326125850.7497.93
openbravopg_defaultpublicm_inoutline61189241.7432935850.9396.71
openbravopg_defaultpublicc_invoiceline37959661.0833313560.9497.46
openbravopg_defaultpublicfact_acct40821651.161590920.0533.60
openbravopg_defaultpublicm_costing28991240.822455730.0796.41
openbravopg_defaultpublicm_transaction20574640.586573030.1981.19
openbravopg_defaultpublicfin_payment_schedule21973860.621002020.0374.23
openbravopg_defaultpublicprpass_pass_trans6591820.1912045430.3485.09
openbravopg_defaultpublicm_productionline16413960.472135180.0687.07
openbravopg_defaultpublicad_audit_trail16295360.46106360.0071.78
openbravopg_defaultpublicprpass_timeslots_res8431800.241983080.0699.85
openbravopg_defaultpublicm_productionplan4302280.122720520.0892.10
openbravopg_defaultpublicad_image2700.001170.006508600.18130700.0013.70
openbravopg_defaultpublicobmobc_logclient2628680.072736260.08650.00360.0076.70
openbravopg_defaultpublicfin_payment4949840.14104960.0087.64

Top DML tables

DBTablespaceSchemaTableInsUpdDelUpd(HOT)SeqScanSeqFetIxScanIxFet
openbravopg_defaultpg_temp_13ad_context_info74377743767439874397
openbravopg_defaultprofilelast_stat_indexes71002159170987184113591243385427597
openbravopg_defaultpublicobmobc_logclient7344251110125629172118094
obmobc_logclient(TOAST)2970105
openbravopg_defaultpublicc_invoice42981184433214391470196186523167031839324424
c_invoice(TOAST)
openbravopg_defaultprofilelast_stat_tables414493789414434318466313687084407900
openbravopg_defaultpublicad_ep_instance_para388333882864956300780
ad_ep_instance_para(TOAST)
openbravopg_defaultpublicc_import_entry125181251812509265746250413310282340
c_import_entry(TOAST)18442184422503891803
openbravopg_defaultpublicm_stock_aux14008347041400825891263995152204
m_stock_aux(TOAST)
openbravopg_defaultpublicm_storage_detail13544492370879454844622811379951774516
m_storage_detail(TOAST)
openbravopg_defaultpublicm_transaction136392920511911305786581505513493674
m_transaction(TOAST)
openbravopg_defaultpg_catalogpg_statistic293352833415184961347437
pg_statistic(TOAST)59885974167351330312
openbravopg_defaultpublicc_orderline9264272191012212362106340800563574359130466359
c_orderline(TOAST)
openbravopg_defaultpublicc_import_entry_archive39312155189703130182155
c_import_entry_archive(TOAST)153441164394723495447
openbravopg_defaultpublicprsync_entry346851553112102256188
prsync_entry(TOAST)18111144751814475
openbravopg_defaultprofilelast_stat_user_functions1242016371242071391372600
last_stat_user_functions(TOAST)
openbravopg_defaultpg_catalogpg_class58824962569237994455920086609620632641958060
openbravopg_defaultpublicprpass_pass_inst95551651836637102072839545135031921022981165
prpass_pass_inst(TOAST)
openbravopg_defaultpublicfact_acct20121526225713800301935712252045
fact_acct(TOAST)
openbravopg_defaultpublicm_productionline8168161441534612005325228395219738365
m_productionline(TOAST)
openbravopg_defaultpublicfin_payment2946204431815963785749985996144695
fin_payment(TOAST)

Top tables by updated/deleted tuples

DBTablespaceSchemaTableUpdUpd(HOT)DelVacuumAutoVacuumAnalyzeAutoAnalyze
openbravopg_defaultpublicc_invoice118443214393
c_invoice(TOAST)
openbravopg_defaultpg_temp_13ad_context_info74376
openbravopg_defaultprofilelast_stat_indexes1591709871554623
openbravopg_defaultpublicm_storage_detail54449370872210
m_storage_detail(TOAST)
openbravopg_defaultpublicobmobc_logclient5111011
obmobc_logclient(TOAST)91
openbravopg_defaultpublicm_stock_aux347042589114008103179
m_stock_aux(TOAST)
openbravopg_defaultprofilelast_stat_tables378943414431554623
openbravopg_defaultpublicc_import_entry1251812509141240
c_import_entry(TOAST)1844229
openbravopg_defaultpublicad_ep_instance_para38828557754
ad_ep_instance_para(TOAST)
openbravopg_defaultpg_catalogpg_statistic29335283341
pg_statistic(TOAST)597411
openbravopg_defaultpublicm_transaction292051191
m_transaction(TOAST)
openbravopg_defaultpublicc_orderline272191221210
c_orderline(TOAST)
openbravopg_defaultpg_catalogpg_class2496223799569924
openbravopg_defaultpublicfin_payment2044381591
fin_payment(TOAST)
openbravopg_defaultpublicc_order18473108755
c_order(TOAST)
openbravopg_defaultpublicprpass_pass_inst165183663
prpass_pass_inst(TOAST)
openbravopg_defaultpublicm_productionline1614415346
m_productionline(TOAST)
openbravopg_defaultpublicfin_finacc_transaction1536328251
fin_finacc_transaction(TOAST)
openbravopg_defaultpublicprsync_entry685551111
prsync_entry(TOAST)144751
openbravopg_defaultprofilelast_stat_user_functions163771124201554623
last_stat_user_functions(TOAST)

Top growing tables

DBTablespaceSchemaTableSizeGrowthInsUpdDelUpd(HOT)
openbravopg_defaultpublicfact_acct31 GB18 MB201215262257
fact_acct(TOAST)
openbravopg_defaultpublicc_order7750 MB14 MB450218473510875
c_order(TOAST)
openbravopg_defaultpublicc_orderline8652 MB14 MB9264272191012212
c_orderline(TOAST)
openbravopg_defaultpublicm_productionline7840 MB9216 kB81681614415346
m_productionline(TOAST)
openbravopg_defaultpublicprpass_pass_inst6274 MB7768 kB9555165183663
prpass_pass_inst(TOAST)
openbravopg_defaultpublicc_invoiceline7416 MB5824 kB88943246272521
c_invoiceline(TOAST)
openbravopg_defaultpublicm_inout4162 MB4784 kB44551164216872
m_inout(TOAST)30 MB96 kB4436
openbravopg_defaultpublicm_inoutline5969 MB4624 kB9035250162306
m_inoutline(TOAST)
openbravopg_defaultpublicfin_payment_schedule5096 MB4336 kB869510369554168
fin_payment_schedule(TOAST)
openbravopg_defaultpublicc_import_entry_archive52 MB1792 kB39312155
c_import_entry_archive(TOAST)999 MB1736 kB1534411643
openbravopg_defaultpublicfin_finacc_transaction3419 MB2704 kB32151536312825
fin_finacc_transaction(TOAST)
openbravopg_defaultpublicad_audit_trail533 MB1656 kB4902
ad_audit_trail(TOAST)
openbravopg_defaultpublicm_productionplan1239 MB480 kB894
m_productionplan(TOAST)
openbravopg_defaultpublicobre_reservation160 kB8192 bytes337198733611
obre_reservation(TOAST)344 kB160 kB37293726
openbravopg_defaultpublicprges_records103 MB64 kB173624
prges_records(TOAST)536 kB
openbravopg_defaultpg_temp_4ad_context_info40 kB40 kB555523
openbravopg_defaultpg_temp_13ad_context_info40 kB40 kB372371
openbravopg_defaultpg_catalogpg_statistic7040 kB8192 bytes2933528334
pg_statistic(TOAST)7288 kB59885974
openbravopg_defaultprofilelast_stat_indexes2040 kB8192 bytes71002159170987
openbravopg_defaultpg_temp_8ad_context_info8192 bytes8192 bytes140108

Top indexes by blocks fetched

DBTablespaceSchemaTableIndexScansBlks%Total
openbravopg_defaultpublicc_orderc_order_key681394902723498423.03
openbravopg_defaultpublicm_inoutlinem_inoutline_orderline569120002284489772.54
openbravopg_defaultpublicc_invoicelinec_invoiceline_orderline562351822257155712.51
openbravopg_defaultpublicm_inoutm_inout_key556323432229870392.48
openbravopg_defaultpublicc_invoicec_invoice_key522008232103421502.34
openbravopg_defaultpublicc_orderlineem_obpos_orderedqty475316991915378822.13
openbravopg_defaultpublicc_orderlinec_orderline_key14434198577220240.64
openbravopg_defaultpublicfin_finacc_transactionfin_finacc_transaction_key14221321570219050.63
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_orderline13445426540305280.60
openbravopg_defaultpublicc_invoicec_invoice_client_org_date_doc81476522266700.58
openbravopg_defaultpublicc_orderc_order_client_org_date_docno50988401764560.45
openbravopg_defaultpublicc_orderlinec_orderline_product1465987327704040.36
openbravopg_defaultpublicc_bpartnerc_bpartner_key13555434301580170.34
openbravopg_defaultpublicad_treenodead_treenode_tree_node_un860462231660230.26
openbravopg_defaultpublicm_inoutm_inout_order4968708199442650.22
openbravopg_defaultpublicm_productm_product_key9208642184565900.21
openbravopg_defaultpublicprpass_pass_transprpass_pass_trans_inst2901624116614890.13
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_product2350473116930.08
openbravopg_defaultpublicfin_finacc_transactionfin_finacc_tr_account_line2084972356400.08
openbravopg_defaultpublicm_product_trlm_product_trl_product_langu_un585357358894990.07

Top indexes by blocks read

DBTablespaceSchemaTableIndexScansBlk Reads%TotalHits(%)
openbravopg_defaultpublicc_invoicec_invoice_client_org_date_doc8147654206421.5489.62
openbravopg_defaultpublicc_orderc_order_client_org_date_docno5098841888321.1989.57
openbravopg_defaultpublicm_inoutlinem_inoutline_orderline5691200032255420.9198.59
openbravopg_defaultpublicc_invoicelinec_invoiceline_orderline5623518231840200.9098.59
openbravopg_defaultpublicc_orderlineem_obpos_orderedqty4753169930179740.8698.42
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_product2350427782700.7962.00
openbravopg_defaultpublicfin_finacc_transactionfin_finacc_tr_account_line2084924062210.6866.74
openbravopg_defaultpublicm_inoutm_inout_key5563234314856300.4299.33
openbravopg_defaultpublicc_orderc_order_documentno_id280511947850.3442.72
openbravopg_defaultpublicprpass_pass_transprpass_pass_trans_inst290162411874770.3489.82
openbravopg_defaultpublicc_invoicec_invoice_key5220082311694390.3399.44
openbravopg_defaultpublicc_orderc_order_key681394908771330.2599.68
openbravopg_defaultpublicc_orderlinec_orderline_key144341985314260.1599.08
openbravopg_defaultpublicc_orderc_order_dateordered_id10652930710.0883.69
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_orderline134454262507340.0799.54
openbravopg_defaultpublicm_costingm_costing_product_date310362334290.0794.70
openbravopg_defaultpublicm_productionplanm_productionplan_key11313432218100.0695.11
openbravopg_defaultpublicc_orderem_obpos_order_docno_trgm2722006200.0651.87
openbravopg_defaultpublicprpass_timeslots_resprpass_timeslots_res_key28414241905390.0595.62
openbravopg_defaultpublicfin_finacc_transactionfin_finacc_transaction_key142213211866400.0599.67

Top growing indexes

DBTablespaceSchemaTableIndexIndexTable
SizeGrowthInsUpdDel
openbravopg_defaultpublicfact_acctfact_acct_key2660 MB15 MB198295234257
openbravopg_defaultpublicfact_acctfact_acct_line_id2755 MB12 MB201215262257
openbravopg_defaultpublicfact_acctfact_acct_table_record_id2986 MB7256 kB197525222257
openbravopg_defaultpublicfact_acctfact_acct_group2493 MB5624 kB195845222257
openbravopg_defaultpublicc_invoicec_invoice_bpartner645 MB4880 kB14074884
openbravopg_defaultpublicc_orderlineem_obpos_orderedqty906 MB3504 kB92641500710
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_orderline792 MB2760 kB955512855
openbravopg_defaultpublicm_inoutm_inout_order430 MB2416 kB358438451
openbravopg_defaultpublicc_invoicec_invoice_updated241 MB1648 kB8774613
openbravopg_defaultpublicm_productionlinem_productionline_prodplan1160 MB1480 kB7338720
openbravopg_defaultpublicc_invoicec_invoice_client_org_date_doc943 MB1400 kB4298970043
openbravopg_defaultpublicc_orderlinec_orderline_product857 MB960 kB566196325
openbravopg_defaultpublicc_invoicec_invoice_key404 MB920 kB4298970043
openbravopg_defaultpublicm_inoutm_inout_key400 MB600 kB445547701
openbravopg_defaultpublicfin_finacc_transactionfin_finacc_tr_account_line396 MB592 kB3215125381
openbravopg_defaultpublicc_orderc_order_documentno_id527 MB584 kB271144764
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_context187 MB304 kB311651110
openbravopg_defaultpublicc_invoicelinec_invoiceline_invoice800 MB144 kB85999
openbravopg_defaultpublicc_orderlinec_orderline_key785 MB128 kB92641500710
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_pk241 MB96 kB1789651110

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_defaultpublicobmobc_logclientobmobc_logclient_log_idx6680 kB48 kB6570851110
openbravopg_defaultpublicc_invoicec_invoice_updated241 MB1648 kB8774613
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_context187 MB304 kB311651110
openbravopg_defaultpublicc_import_entryem_prres_organization_idx1384 kB125181251812509
openbravopg_defaultpublicfact_acctfact_acct_line_id2755 MB12 MB201215262257
openbravopg_defaultpg_catalogpg_classpg_class_tblspc_relfilenode_index320 kB397579375
openbravopg_defaultpublicad_process_runad_process_run_ould_be_killed8192 bytes147147
openbravopg_defaultpublicc_filec_file_record_idx16 MB6

User function statistics

Top functions by total time

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopublicto_char7634558821325.861325.860.0000.000
openbravopublicto_char605795928860.59860.590.0000.000
openbravopubliccactl_calculate_consumption1284411.18411.150.3200.320
openbravopublicto_char394291905192.31192.310.0000.000
openbravopublicc_order_post11487180.4513.750.1210.009
openbravopublicc_order_post1483180.280.040.1220.000
openbravopublicc_order_post11483180.240.030.1220.000
openbravopublicad_extension_point_handler857883.183.590.0100.000
openbravoprofiletake_sample2381.930.013.5620.001
openbravoprofiletake_sample_subset2381.920.073.5620.003
openbravoprofiletake_sample2381.853.133.5590.136
openbravopublicpricm_createproductprice328275.2434.300.0230.010
openbravoprofiledblink62169.9569.950.1130.113
openbravoprofilecollect_pg_stat_statements_stats2260.910.862.7690.039
openbravopublicc_invoice_create132560.148.360.0450.006
openbravopublicc_invoice_post140655.7024.310.0400.017
openbravopublicto_date1721396643.3543.350.0000.000
openbravopubliccactl_ep_before_order_price29838.4738.450.1290.129
openbravopublicto_number2435548637.7237.720.0000.000
openbravopublicm_inout_create114129.790.030.0260.000

Top functions by executions

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopublicto_char7634558821325.861325.860.0000.000
openbravopublicto_char605795928860.59860.590.0000.000
openbravopublicto_char394291905192.31192.310.0000.000
openbravopublicto_number2435548637.7237.720.0000.000
openbravopublicto_date1721396643.3543.350.0000.000
openbravopublicto_char85788644.684.680.0000.000
openbravopublicsubstract_days25319921.961.960.0000.000
openbravopublicad_istriggerenabled178459511.5011.500.0000.000
openbravopublicadd_days13162841.711.710.0000.000
openbravopublicad_isorgincluded117978313.0613.060.0000.000
openbravopublicto_date8347591.871.870.0000.000
openbravopublicuuid_generate_v45850872.132.130.0000.000
openbravopublicad_org_isinnaturaltree48337212.072.380.0000.000
openbravopublicget_uuid1950294.162.020.0000.000
openbravopublicto_char1935480.310.310.0000.000
openbravopublictrunc1491750.350.350.0000.000
openbravopublictrunc1139010.230.230.0000.000
openbravopublicround1052370.200.200.0000.000
openbravopublicobequals611310.250.250.0000.000
openbravopublicprouti_qtyremainingorderline593096.896.890.0000.000

Top trigger functions by total time

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopublicpricm_productprice335976.030.090.0230.000
openbravopublicm_productionline_trg2439818.503.470.0010.000
openbravopubliccactl_m_prodline_losses_trg821011.492.660.0010.000
openbravopublicc_orderline_trg23649310.623.250.0000.000
openbravopublicau_c_order_trg229739.238.890.0000.000
openbravopublicm_transaction_trg428628.744.890.0000.000
openbravopublicc_invoiceline_trg2121678.253.000.0010.000
openbravopubliccactl_product_org241357.961.270.0000.000
openbravopublicc_invoice_trg1255654.543.740.0000.000
openbravopublicaeatsii_invoice_trg1255624.372.120.0000.000
openbravopublicc_orderline2_trg364933.843.560.0000.000
openbravopublicc_invoice_trg21225152.811.610.0000.000
openbravopublicc_orderlinetax_trg121062.492.040.0000.000
openbravopublicc_invoicelinetax_trg106832.471.600.0000.000
openbravopublicc_orderline_trg364662.191.940.0000.000
openbravopublicpriuti_c_invoice_ref_trg1225152.141.460.0000.000
openbravopublicintr_c_orderline_trg364561.900.690.0000.000
openbravopublicm_inoutline_trg115421.871.640.0000.000
openbravopublicc_ordline_chk_restrictions_trg364661.821.700.0000.000
openbravopublicpruti_inherit_invoice_contact1225491.550.890.0000.000

Vacuum-related statistics

Top tables by vacuum operations

DBTablespaceSchemaTableVacuum countAutovacuum countInsUpdDelUpd(HOT)
openbravopg_defaultpublicad_ep_instance_para5573883338828
openbravopg_defaultprofilelast_stat_tables1554144937894144343
openbravopg_defaultprofilelast_stat_indexes15571002159170987
openbravopg_defaultprofilelast_stat_user_functions1551242016371242071
openbravopg_defaultpublicc_import_entry141125181251812509
openbravopg_defaultpublicm_stock_aux10314008347041400825891
openbravopg_defaultpublicad_sequence671280112689
openbravopg_defaultpublicobpos_applications5662616261
openbravopg_defaultpublicobre_reservation40337198733611
openbravopg_defaultpublicfin_financial_account3830803080
openbravopg_defaultpublicobre_resource1021622150
openbravopg_defaultpg_catalogpg_class95882496256923799
openbravopg_defaultpublicm_transaction_last6412174
openbravopg_defaultpg_catalogpg_type2673660
openbravopg_defaultpg_catalogpg_rewrite221822181
openbravopg_defaultpublicad_element_trl22102468414
openbravopg_defaultpublicad_error_log245294516
openbravopg_defaultpublicad_menu_trl2212511093
openbravopg_defaultpublicad_message_trl2111282811682
openbravopg_defaultpublicad_process_trl22770719

Top tables by analyze operations

DBTablespaceSchemaTableAnalyze countAutoanalyze countInsUpdDelUpd(HOT)
openbravopg_defaultpublicad_ep_instance_para7543883338828
openbravopg_defaultpublicc_import_entry240125181251812509
openbravopg_defaultpublicm_stock_aux17914008347041400825891
openbravopg_defaultpublicad_sequence1251280112689
openbravopg_defaultpublicobpos_applications9662616261
openbravopg_defaultprofilelast_stat_tables46234144937894144343
openbravopg_defaultprofilelast_stat_indexes462371002159170987
openbravopg_defaultprofilelast_stat_user_functions46231242016371242071
openbravopg_defaultpublicfin_financial_account4730803080
openbravopg_defaultpublicobre_reservation47337198733611
openbravopg_defaultpg_catalogpg_class245882496256923799
openbravopg_defaultpublicobre_resource2321622150
openbravopg_defaultprofilelast_stat_tablespaces204040
openbravopg_defaultpublicad_session141521031610053
openbravopg_defaultpublicm_transaction_last11412174
openbravopg_defaultpublicm_storage_detail101354449237087
openbravopg_defaultpublicc_bpartner759795974
openbravopg_defaultpublicad_process_request1594532306514
openbravopg_defaultpg_catalogpg_type5673660
openbravopg_defaultpublicad_error_log445294516

Top indexes by estimated vacuum load

DBTablespaceSchemaTableIndex~Vacuum bytesVacuum cntAutovacuum cntIX sizeRelsize
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_timestamp290 MB1290 MB1402 MB
openbravopg_defaultpublicm_stock_auxm_stock_aux_aux_id246 MB992544 kB4400 kB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_pk241 MB1241 MB1402 MB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_cache210 MB1210 MB1402 MB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_term_date202 MB1202 MB1402 MB
openbravopg_defaultpublicc_import_entryem_prres_organization_idx191 MB1411384 kB1013 kB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_context187 MB1187 MB1402 MB
openbravopg_defaultpublicad_ep_instance_paraad_ep_instance_para_key187 MB557344 kB32 kB
openbravopg_defaultpublicc_import_entryc_import_entry_key131 MB141952 kB1013 kB
openbravopg_defaultpublicc_import_entryem_prres_typeofdata_idx124 MB141904 kB1013 kB
openbravopg_defaultpublicc_import_entryc_import_entry_type_status118 MB141856 kB1013 kB
openbravopg_defaultpublicc_import_entryem_obpos_application_fk108 MB141784 kB1013 kB
openbravopg_defaultpublicc_import_entryc_import_entry_idx94 MB141680 kB1013 kB
openbravopg_defaultprofilelast_stat_indexespk_last_stat_indexes81 MB152548 kB2038 kB
openbravopg_defaultpublicm_stock_auxm_stock_aux_storage_detail_id70 MB99728 kB4400 kB
openbravopg_defaultpublicm_stock_auxm_stock_aux_key60 MB99616 kB4400 kB
openbravopg_defaultprofilelast_stat_tablespk_last_stat_tables43 MB148296 kB1552 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_storagedet_qtyorderonhand26 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_catalogpg_attribute372457213162026-07-15 06:31:16.739378+016840 kB
openbravopg_toastpg_toast_26192467470162026-07-15 21:00:27.753248+017288 kB
openbravopg_catalogpg_statistic107281898152026-07-15 10:48:34.732058+017040 kB
openbravoprofilesample_stat_tables273774693142026-07-14 23:00:55.442262+018656 kB
openbravopg_toastpg_toast_2278562165306122026-06-29 05:14:25.739162+016104 kB
openbravopg_toastpg_toast_232469134791800112026-05-19 02:38:47.391039+0130 MB
openbravopublicfin_finacc_transaction660361066023592026-04-02 14:41:49.577329+013419 MB
openbravopublicc_invoice702463277080892026-07-08 00:23:08.546646+017098 MB
openbravopublicm_product15673173092026-02-20 19:44:18.669967+0010232 kB
openbravopublicc_order727841266443887750 MB
openbravopublicm_requisitionline3181693076082026-07-06 12:22:50.3815+01184 MB
openbravopublicad_process_run21902150562026-06-01 11:38:18.108022+0122 MB
openbravopublicfact_acct38002245275178862025-07-31 23:28:10.407953+0131 GB
openbravopublicc_orderline1439921273854448652 MB
openbravopublicprpass_pass_inst1312732762796546274 MB
openbravopg_toastpg_toast_2302483409911164332026-05-19 02:10:58.737588+01999 MB
openbravopublicm_inout725228824460332025-10-20 23:54:32.431835+014162 MB
openbravopublicfin_payment_schedule1416090443471125096 MB
openbravopublicc_import_entry_archive91995215522025-12-16 22:55:58.255774+0052 MB
openbravopublicm_productionline2006333020946817840 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_statistic1072818989734449770987040 kB
openbravopublicprges_records705261023683392026-03-31 15:00:51.685568+01103 MB
openbravopublicad_audit_trail21156028417795282026-06-21 20:32:38.637677+01533 MB
openbravopublicc_invoice702463277080867819282026-07-10 16:34:36.965521+017098 MB
openbravopublicm_productionline20063330209468172390882026-04-18 16:29:40.193815+017840 MB
openbravopublicm_requisitionline318169307602931182026-07-12 13:22:28.736582+01184 MB
openbravopublicprpass_pass_inst13127327627965120147582026-04-13 09:36:44.580373+016274 MB
openbravopg_catalogpg_attribute372457213350072026-07-15 13:32:06.184227+016840 kB
openbravopublicfin_payment_schedule14160904434711107169672026-04-22 11:37:34.369148+015096 MB
openbravoprofilesample_stat_tables273774693210762026-07-15 20:00:26.61707+018656 kB
openbravopublicm_product156731730104052026-07-13 10:43:57.196489+0110232 kB
openbravopublicfin_finacc_transaction660361066023532997042026-06-27 12:53:00.341557+013419 MB
openbravopublicc_order727841266443837605542026-06-29 09:41:55.68684+017750 MB
openbravopublicc_invoiceline142372494817058353342026-02-28 09:04:55.209925+007416 MB
openbravopublicc_file268670193919232026-02-09 12:48:30.95508+0096 MB
openbravopublicm_inoutline142394262819555803232026-03-06 11:59:32.517041+005969 MB
openbravopublicfact_acct38002245275178890600822026-06-25 13:36:17.490096+0131 GB
openbravopublicc_orderline1439921273854436355922026-07-06 00:03:35.926283+018652 MB
openbravopublicm_productionplan3449100969957022026-02-28 13:31:59.297829+001239 MB
openbravopublicad_process_run21902150537212026-07-15 17:04:25.208173+0122 MB

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