Postgres profile report (StartID: 357, EndID: 380)

pg_profile version 0.3.6

Server name: local

Report interval: 2026-07-14 04:00:02+01 - 2026-07-15 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
openbravo1150332610396.8632869316910145774872285401546351014993088694776963343876037612 GB192289 GB397 MB
postgres1170199.08605465214019039243481456391 kB
Total1162033610396.8632869922310146427012285420585591015027903194776963343876037612 GB192289 GB397 MB

Statement statistics by database

DatabaseCallsTime (s)Fetched (blk)Dirtied (blk)Temp (blk)Local (blk)Statements
ExecReadWriteTrgSharedLocalSharedLocalReadWriteReadWrite
openbravo2031816931776.42402.2610813078288264250912336951212911866071599703239658557
postgres56128.6886756345
template163488.367176276
Total2033012931793.46402.2610813172220264250912336951212911866071599703239659178

Cluster statistics

MetricValue
Scheduled checkpoints276
Requested checkpoints
Checkpoint write time (s)46750.30
Checkpoint sync time (s)22.75
Checkpoints buffers written1111851
Background buffers written506974
Backend buffers written175605
Backend fsync count
Bgwriter interrupts (too many buffers)3001
Number of buffers allocated217264476
WAL generated11 GB
WAL segments archived687
WAL segments archive failed

Tablespace statistics

TablespacePathSizeGrowth
pg_default289 GB397 MB
pg_global1014 kB8192 bytes

SQL query statistics

Top SQL by execution time

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

4aae53f3da

[5b93a467]

openbravo2817.598.8620717.56416374.594105420.27611293.497136

9918228dba

[9603f2b6]

openbravo2780.608.75150341610.584552.710947.65133.1224554

b76ef6c915

[84cd185c]

openbravo1506.814.74122624303.4186627.869127655.74726848.04562

2ea6727409

[5cfb16aa]

openbravo1342.744.221847297.4886325.53142871.6432854.145184

6aeca8addc

[e0869ab2]

openbravo1223.703.858932.0957633.11314783.2081741.592137

6e47e0b2e7

[c4153bc0]

openbravo870.962.7427554622328.762209.51521496.5811989.525374

4a3e0e1397

[4f62fc29]

openbravo840.252.64944223.75443138.15748819.2351280.75319

60ced86ccb

[e11c57bb]

openbravo817.752.5743039.68741297.32044924.043850.32919

59ed037ff5

[f51c7e38]

openbravo716.722.25139739817.55527388.55850882.8165205.04918

185ba8cb63

[6e2f4e1a]

openbravo693.402.1810630918.7790.0228026.75556.59578987

189e272f54

[d917b591]

openbravo658.782.0731243918.40943086.37744654.176516.82915

bba759f90a

[fba70628]

openbravo602.631.901127534.72124.7928353.9031148.8441127

74a616a7b1

[92450523]

openbravo601.311.89329200437.683100033.548301662.37482316.6683

416d959161

[fb2a3095]

openbravo580.491.834878.0714222.07313320.1341371.069119

ec8c626e99

[cd9c0fd2]

openbravo360.121.136056360115.867360115.867360115.8671

67a75a3409

[7318d810]

openbravo342.061.0837982370342056.355342056.355342056.3551

3048d15da5

[ebcd9f66]

openbravo267.410.84210267406.945267406.945267406.9451

c17924c407

[bae859d8]

openbravo258.200.8110572556.43722.29113496.2534188.961101

2fc2aa8125

[3fe437d2]

openbravo225.280.71657734.2420.0072646.74398.2646579

c180ac6f1a

[2266d068]

openbravo221.360.707992088.29022.70928664.8545052.213106

Top SQL by executions

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

b280347c9b

[fc9c6197]

openbravo345509416.9934550940.0100.0086.0270.00735.4

9a0540688d

[263f5b0b]

openbravo13223476.506821350.0030.0002.0020.0033.3

10410964a2

[6df21622]

openbravo6794493.346794490.0030.0020.9830.0032.1

a46753d96b

[d2788d4]

openbravo6067822.986067820.0030.00111.2630.0151.8

1b89da5cec

[6f9b1a85]

openbravo3016491.480.0010.0000.8180.0020.2

8a7672d920

[2049516b]

openbravo2973631.460.0010.0001.4430.0030.2

7247cdc8b5

[aada7118]

openbravo2730601.34123480.0100.0036.4720.0282.8

03a1d4e90c

[1c1c8a81]

openbravo1961460.961961460.0030.0024.5030.0110.6

f2e5c3fd88

[2b8e321f]

openbravo1935410.951935410.0060.0032.2980.0081.2

784dd58a53

[c7e884e0]

openbravo1868410.921868410.0040.0021.0430.0040.7

08c88cedcc

[6d0d7fc]

openbravo1813380.891813380.0050.0023.1870.0091.0

3448f4b5f7

[9a13edb3]

openbravo1776850.871776850.0980.01016.0650.12517.4

2bbd1014ed

[d9433e44]

openbravo1591810.781591810.0030.0021.2670.0060.5

ab6445a3b6

[a5716dbe]

openbravo1437390.711437390.2330.2043.6880.05333.5

b93f3a3e02

[30f21dca]

openbravo1437380.711437380.2620.2048.7340.07337.7

1fbcf388f5

[588b10e0]

openbravo1415090.700.0020.0010.5680.0020.3

281ee3922a

[5d6197e1]

openbravo1282970.631282970.0070.0040.5600.0050.9

25642c2b16

[153ca6de]

openbravo1197000.591197000.0060.0040.7700.0030.7

ef907626c8

[80dcf025]

openbravo1197000.591197000.0050.0001.1540.0050.6

10f4e6f2bf

[413ce6da]

openbravo1056720.521056720.0210.0062.4830.0162.2

Top SQL by shared blocks fetched

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

4aae53f3da

[5b93a467]

openbravo146290117813.5394.672817.6136

2ea6727409

[5cfb16aa]

openbravo123997641911.4799.781342.7184184

185ba8cb63

[6e2f4e1a]

openbravo7773616317.1999.90693.4106309178987

6aeca8addc

[e0869ab2]

openbravo6555158216.0697.561223.7137

6e47e0b2e7

[c4153bc0]

openbravo3386139333.1394.90871.02755462374

b76ef6c915

[84cd185c]

openbravo2522056332.3399.271506.8122662

e17f13e4ac

[8e963014]

openbravo2019753571.8799.22206.33434

c17924c407

[bae859d8]

openbravo1956937481.8198.54258.21057101

e4b8f19235

[464f8019]

openbravo1654139681.5399.67180.72727

c180ac6f1a

[2266d068]

openbravo1432314681.3298.20221.4799106

59ed037ff5

[f51c7e38]

openbravo1327302371.2399.36716.7139718

60ced86ccb

[e11c57bb]

openbravo1280605361.18100.00817.819

d817a62e25

[c297f073]

openbravo1225455831.1395.86142.52020

416d959161

[fb2a3095]

openbravo1178260961.0960.90580.5119

4a3e0e1397

[4f62fc29]

openbravo1163990541.08100.00840.3919

0e9468862d

[2b62da05]

openbravo1102672581.0299.41143.21718

bba759f90a

[fba70628]

openbravo1099173311.0299.34602.611271127

b4d6b6665e

[72db11e8]

openbravo1098078371.0278.72190.0137

9fe6110436

[49176a12]

openbravo1041665110.9699.93108.01717

bde1a48003

[7d7d1050]

openbravo926165230.8699.7394.5121121

Top SQL by shared blocks read

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

4aae53f3da

[5b93a467]

openbravo7791921322.9394.672817.6136

416d959161

[fb2a3095]

openbravo4606636813.5660.90580.5119

b4d6b6665e

[72db11e8]

openbravo233710126.8878.72190.0137

74a616a7b1

[92450523]

openbravo193917835.7160.13601.33293

6e47e0b2e7

[c4153bc0]

openbravo172586615.0894.90871.02755462374

6aeca8addc

[e0869ab2]

openbravo159930694.7197.561223.7137

3048d15da5

[ebcd9f66]

openbravo74183642.1854.27267.42101

d817a62e25

[c297f073]

openbravo50791231.4995.86142.52020

67a75a3409

[7318d810]

openbravo40067461.18342.1379823701

03d9123317

[94eb716f]

openbravo38630631.1495.80157.01515

22615c404b

[c1020a32]

openbravo38046551.1272.98106.5321

f570d33a96

[57d3e9b9]

openbravo35187611.0479.2264.8108

18c54477aa

[5bd4159e]

openbravo34495771.0255.4060.2114

d3471812de

[aa92e059]

openbravo31512100.9392.21171.166

964d1d9b09

[ecb18403]

openbravo29437230.8731.5439.888

c17924c407

[bae859d8]

openbravo28526720.8498.54258.21057101

2ea6727409

[5cfb16aa]

openbravo27406970.8199.781342.7184184

c180ac6f1a

[2266d068]

openbravo25812650.7698.20221.4799106

2fc2aa8125

[3fe437d2]

openbravo24736890.7397.20225.365776579

531757f0c6

[f7992a5b]

openbravo24221090.7151.02206.155

Top SQL by shared blocks dirtied

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

d545a87b3d

[a03a69a5]

openbravo2158189.2497.8131.95714157141

6758866a26

[eb67e33f]

openbravo1170555.0194.2120.57525175251

8d75ee1767

[3695269c]

openbravo887213.8095.8019.62061620616

7efafc5af2

[74267a2]

openbravo721283.0992.19189.113351335

ff35139986

[a35d3b99]

openbravo721283.0992.19189.113351335

4cb9cc1cbf

[ea4e56b9]

openbravo721283.0992.19189.113351335

2c756b6487

[4211bbca]

openbravo622892.6745.019.11

101ed24576

[205b8c88]

openbravo490062.1098.537.71467114671

e58a3f6831

[e9815261]

openbravo390841.6796.0538.884

fec93ea334

[2ff59f28]

openbravo346631.4899.426.65532455324

e1739d379d

[6f92ba97]

openbravo322271.3811.9686.070149061

43a80059e4

[bfd8039a]

openbravo320731.3799.1750.610671067

7cdb887c2a

[8f1d721]

openbravo270571.1699.3719.059785978

26959f7c7a

[d3eb78]

openbravo252731.0889.666.71230912309

320ed06a6d

[41b729f2]

openbravo240241.0395.384.255395539

2c52c242a6

[4282957f]

openbravo235161.0195.5310.91953019530

fa5e805d20

[6bdd6481]

openbravo231010.9998.136.954425442

fe49fa204f

[3ef02a9d]

openbravo222730.9596.933.299089908

86ae00e408

[12018251]

openbravo217970.9384.994.959795979

1b416379ea

[97b6b91a]

openbravo184510.7994.413.452675267

Top SQL by shared blocks written

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

2c756b6487

[4211bbca]

openbravo465092.5926.4945.019.11

98d4183d4b

[6ee18a4d]

openbravo132150.747.5348.200.61

6e47e0b2e7

[c4153bc0]

openbravo101240.565.7794.90871.02755462374

b4d6b6665e

[72db11e8]

openbravo76850.434.3878.72190.0137

6aeca8addc

[e0869ab2]

openbravo41140.232.3497.561223.7137

8b47e0efaf

[429b2ffc]

openbravo39370.222.2467.190.41

4aae53f3da

[5b93a467]

openbravo18360.101.0594.672817.6136

4d81be31dd

[4fc19d38]

openbravo18320.101.0490.039.611

03d9123317

[94eb716f]

openbravo18150.101.0395.80157.01515

d3471812de

[aa92e059]

openbravo16350.090.9392.21171.166

b76ef6c915

[84cd185c]

openbravo10720.060.6199.271506.8122662

964d1d9b09

[ecb18403]

openbravo10260.060.5831.5439.888

c17924c407

[bae859d8]

openbravo10240.060.5898.54258.21057101

bf18c8b741

[f96535da]

openbravo10210.060.5894.7824.514031

34b8ae3227

[d531b37c]

openbravo9710.050.5596.946.811

075d776740

[aaa12b55]

openbravo8100.050.4697.5339.99010

4dea79c24d

[d87869f1]

openbravo7600.040.4392.9222.622

20bf60e95d

[c21a81d2]

openbravo6040.030.3498.3481.61313

5a62f392ad

[1e5d1bbf]

openbravo4890.030.2891.540.31

3aafe57489

[cb8efa32]

openbravo4680.030.2797.2425.933

Top SQL by temp usage

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

132ce48f1d

[9e93f62c]

openbravo56625235.4056625247.7228.211

b76ef6c915

[84cd185c]

openbravo36833523.0336839531.051506.8122662

7e62f3b264

[6e3dad39]

openbravo1564689.78642185.4144.736414

8ec2df7b9d

[6e556c27]

openbravo1452959.08596315.0341.433813

1ac0a3f4b1

[6c00ed9a]

openbravo1036086.48231781.95121.35848

ac7478aac8

[58a0d3d2]

openbravo467592.92183521.550.744

f66a111527

[46df0a8e]

openbravo565243.5345360.383.311

d3471812de

[aa92e059]

openbravo374972.34229601.93171.166

d2416a9e98

[90325c79]

openbravo332102.0891700.7715.5227

bb66bde6a9

[5584a57a]

openbravo225181.41136711.158.822

7871717022

[fbc81439]

openbravo152880.96152881.291.577

4dea79c24d

[d87869f1]

openbravo150750.9473010.6222.622

a065237476

[4f137456]

openbravo111770.7045870.393.2261

00c98130c9

[4d5eeb65]

openbravo104820.6644720.384.124

5c9cd00b05

[aba3845d]

openbravo76420.4845920.397.411

b524945fb7

[e4238259]

openbravo35730.2240.000.211

b32c4689a3

[68533695]

openbravo7578999.1961725.750.37394773947

0cd52372ae

[1774cfb6]

openbravo1340299.61522.170.01325113251

67e57d4c88

[4c17668d]

openbravo914199.60371.540.090329032

83a936f681

[590caf08]

openbravo697899.60281.170.068996899

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)
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)
25642c2b16SELECT count(*) FROM c_orderline WHERE c_order_id=orderID
0cd52372aeinsert into ad_context_info (ad_user_id, ad_session_id, processType, processId) values ($1, $2, $3, $4)
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
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
0e9468862dselect 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 (upper(order0_.Deliverynotes) like upper($1) escape $43) and order0_.IsSOTrx=$44 and documentty1_.IsReturn=$45 and (order0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (order0_.AD_Client_ID in ($40 , $41)) order by order0_.DatePromised desc, order0_.C_Order_ID desc limit $42
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)
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
2fc2aa8125select materialmg0_.M_Costing_ID as M_Costin1_453_, materialmg0_.Created as Created2_453_, materialmg0_.Createdby as Createdb3_453_, materialmg0_.Updated as Updated4_453_, materialmg0_.Updatedby as Updatedb5_453_, materialmg0_.AD_Client_ID as AD_Clien6_453_, materialmg0_.AD_Org_ID as AD_Org_I7_453_, materialmg0_.M_Product_ID as M_Produc8_453_, materialmg0_.DateFrom as DateFrom9_453_, materialmg0_.DateTo as DateTo10_453_, materialmg0_.IsManual as IsManua11_453_, materialmg0_.C_InvoiceLine_ID as C_Invoi12_453_, materialmg0_.Qty as Qty13_453_, materialmg0_.Price as Price14_453_, materialmg0_.Cumstock as Cumstoc15_453_, materialmg0_.Costtype as Costtyp16_453_, materialmg0_.Ispermanent as Isperma17_453_, materialmg0_.Cost as Cost18_453_, materialmg0_.Cumcost as Cumcost19_453_, materialmg0_.Isproduction as Isprodu20_453_, materialmg0_.Isactive as Isactiv21_453_, materialmg0_.M_Warehouse_ID as M_Wareh22_453_, materialmg0_.M_Transaction_ID as M_Trans23_453_, materialmg0_.C_Currency_ID as C_Curre24_453_, materialmg0_.Originalcost as Origina25_453_ from M_Costing materialmg0_ where materialmg0_.M_Product_ID=$1 and materialmg0_.DateFrom<=$2 and materialmg0_.Costtype=$7 and (materialmg0_.Cost is not null) and (materialmg0_.Cumstock is not null) and (materialmg0_.Cumcost is not null) and (materialmg0_.M_Warehouse_ID is null) and materialmg0_.AD_Org_ID=$3 and (materialmg0_.AD_Client_ID in ($4 , $5)) and materialmg0_.Isactive=$8 order by materialmg0_.DateFrom desc, materialmg0_.DateTo desc, materialmg0_.Created desc limit $6
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
e4b8f19235select order0_.C_Order_ID as C_Order_1_276_, order0_.AD_Client_ID as AD_Clien2_276_, order0_.AD_Org_ID as AD_Org_I3_276_, order0_.IsActive as IsActive4_276_, order0_.Created as Created5_276_, order0_.CreatedBy as CreatedB6_276_, order0_.Updated as Updated7_276_, order0_.UpdatedBy as UpdatedB8_276_, order0_.IsSOTrx as IsSOTrx9_276_, order0_.DocumentNo as Documen10_276_, order0_.DocStatus as DocStat11_276_, order0_.DocAction as DocActi12_276_, order0_.Processing as Process13_276_, order0_.Processed as Process14_276_, order0_.C_DocType_ID as C_DocTy15_276_, order0_.C_DocTypeTarget_ID as C_DocTy16_276_, order0_.Description as Descrip17_276_, order0_.IsDelivered as IsDeliv18_276_, order0_.IsInvoiced as IsInvoi19_276_, order0_.IsPrinted as IsPrint20_276_, order0_.IsSelected as IsSelec21_276_, order0_.SalesRep_ID as SalesRe22_276_, order0_.DateOrdered as DateOrd23_276_, order0_.DatePromised as DatePro24_276_, order0_.DatePrinted as DatePri25_276_, order0_.DateAcct as DateAcc26_276_, order0_.C_BPartner_ID as C_BPart27_276_, order0_.BillTo_ID as BillTo_28_276_, order0_.C_BPartner_Location_ID as C_BPart29_276_, order0_.POReference as PORefer30_276_, order0_.IsDiscountPrinted as IsDisco31_276_, order0_.C_Currency_ID as C_Curre32_276_, order0_.PaymentRule as Payment33_276_, order0_.C_PaymentTerm_ID as C_Payme34_276_, order0_.InvoiceRule as Invoice35_276_, order0_.DeliveryRule as Deliver36_276_, order0_.FreightCostRule as Freight37_276_, order0_.FreightAmt as Freight38_276_, order0_.DeliveryViaRule as Deliver39_276_, order0_.M_Shipper_ID as M_Shipp40_276_, order0_.C_Charge_ID as C_Charg41_276_, order0_.ChargeAmt as ChargeA42_276_, order0_.PriorityRule as Priorit43_276_, order0_.TotalLines as TotalLi44_276_, order0_.GrandTotal as GrandTo45_276_, order0_.M_Warehouse_ID as M_Wareh46_276_, order0_.M_PriceList_ID as M_Price47_276_, order0_.IsTaxIncluded as IsTaxIn48_276_, order0_.C_Campaign_ID as C_Campa49_276_, order0_.C_Project_ID as C_Proje50_276_, order0_.C_Activity_ID as C_Activ51_276_, order0_.Posted as Posted52_276_, order0_.AD_User_ID as AD_User53_276_, order0_.CopyFrom as CopyFro54_276_, order0_.DropShip_BPartner_ID as DropShi55_276_, order0_.DropShip_Location_ID as DropShi56_276_, order0_.DropShip_User_ID as DropShi57_276_, order0_.IsSelfService as IsSelfS58_276_, order0_.AD_OrgTrx_ID as AD_OrgT59_276_, order0_.User1_ID as User60_276_, order0_.User2_ID as User61_276_, order0_.Deliverynotes as Deliver62_276_, order0_.C_Incoterms_ID as C_Incot63_276_, order0_.Incotermsdescription as Incoter64_276_, order0_.Generatetemplate as Generat65_276_, order0_.Delivery_Location_ID as Deliver66_276_, order0_.CopyFromPO as CopyFro67_276_, order0_.FIN_Paymentmethod_ID as FIN_Pay68_276_, order0_.FIN_Payment_Priority_ID as FIN_Pay69_276_, order0_.RM_PickFromShipment as RM_Pick70_276_, order0_.RM_ReceiveMaterials as RM_Rece71_276_, order0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm72_276_, order0_.RM_CreateInvoice as RM_Crea73_276_, order0_.C_Return_Reason_ID as C_Retur74_276_, order0_.RM_AddOrphanLine as RM_AddO75_276_, order0_.A_Asset_ID as A_Asset76_276_, order0_.Calculate_Promotions as Calcula77_276_, order0_.C_Costcenter_ID as C_Costc78_276_, order0_.Convertquotation as Convert79_276_, order0_.C_Reject_Reason_ID as C_Rejec80_276_, order0_.validuntil as validun81_276_, order0_.Quotation_ID as Quotati82_276_, order0_.SO_Res_Status as SO_Res_83_276_, order0_.Create_POLines as Create_84_276_, order0_.EM_Obdisc_Addpack as EM_Obdi85_276_, order0_.Iscashvat as Iscashv86_276_, order0_.EM_OBMFM_Selectfreight as EM_OBMF87_276_, order0_.EM_OBMFM_Delivery_Period_ID as EM_OBMF88_276_, order0_.RM_Pickfromreceipt as RM_Pick89_276_, order0_.Cancelandreplace as Cancela90_276_, order0_.EM_Advcrm_Newactivity as EM_Advc91_276_, order0_.EM_APRM_AddPayment as EM_APRM92_276_, order0_.EM_OBMFM_Delivery_Charges as EM_OBMF93_276_, order0_.EM_OBMFM_Freight_ID as EM_OBMF94_276_, order0_.EM_Obwpl_Generatepicking as EM_Obwp95_276_, order0_.EM_Advcrm_Opportunity_ID as EM_Advc96_276_, order0_.EM_OBMFM_Weight as EM_OBMF97_276_, order0_.EM_Obwpl_Isinpickinglist as EM_Obwp98_276_, order0_.EM_Rcinv_Contractdate as EM_Rcin99_276_, order0_.EM_Obwpl_Readypl as EM_Obw100_276_, order0_.EM_Rcinv_Initialdate as EM_Rci101_276_, order0_.EM_Rcinv_Enddate as EM_Rci102_276_, order0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_276_, order0_.EM_OBMFM_Weight_Uom_ID as EM_OBM104_276_, order0_.EM_Rcinv_Frequency as EM_Rci105_276_, order0_.EM_OBMFM_Set_Weight as EM_OBM106_276_, order0_.EM_Rcinv_Renewautomatically as EM_Rci107_276_, order0_.EM_Aeatsii_Fecha_Operacion as EM_Aea108_276_, order0_.EM_Ml_Select_Product as EM_Ml_109_276_, order0_.EM_Rcinv_Renovationtimes as EM_Rci110_276_, order0_.Confirmcancelandreplace as Confir111_276_, order0_.EM_Aeatsii_Descripcion_Sii as EM_Aea112_276_, order0_.EM_Obpos_Applications_ID as EM_Obp113_276_, order0_.EM_Rcinv_Freqrenovationtime as EM_Rci114_276_, order0_.EM_Obpos_Sendemail as EM_Obp115_276_, order0_.EM_Rcinv_Ordercontract_ID as EM_Rci116_276_, order0_.EM_Obpos_Email_Status as EM_Obp117_276_, order0_.EM_Rcinv_Freqtime as EM_Rci118_276_, order0_.Cancelledorder_id as Cancel119_276_, order0_.EM_Obpos_App_Cashup_ID as EM_Obp120_276_, order0_.EM_Obpos_Createdabsolute as EM_Obp121_276_, order0_.Replacedorder_id as Replac122_276_, order0_.EM_OBPOS_NotInvoiceOnCashUp as EM_OBP123_276_, order0_.EM_Obpos_Rejected_Quotat_ID as EM_Obp124_276_, order0_.EM_Obpos_Isdeleted as EM_Obp125_276_, order0_.Iscancelled as Iscanc126_276_, order0_.EM_Obpos_Islayaway as EM_Obp127_276_, order0_.EM_Obpos_Prepaymentamt as EM_Obp128_276_, order0_.Replacementorder_ID as Replac129_276_, order0_.EM_Obpos_Prepaymentlimitamt as EM_Obp130_276_, order0_.EM_Obpos_Prepaymentlaylimitamt as EM_Obp131_276_, order0_.EM_Obpos_Rounding_Amount as EM_Obp132_276_, order0_.BPartner_ExtRef as BPartn133_276_, order0_.EM_Obpos_Sequencename as EM_Obp134_276_, order0_.EM_Prqc_Clauses_Selector as EM_Prq135_276_, order0_.EM_Obpos_Sequencenumber as EM_Obp136_276_, order0_.EM_Rcinv_Cancelcontract as EM_Rci137_276_, order0_.EM_Rcinv_Cancelleddate as EM_Rci138_276_, order0_.EM_Rcinv_Iscancelled as EM_Rci139_276_, order0_.EM_Psat_Activity_ID as EM_Psa140_276_, order0_.EM_OBSMAIL_EmailAddress as EM_OBS141_276_, order0_.EM_Prouti_Order_Stock as EM_Pro142_276_, order0_.EM_Prouti_Pregenerate_Minout as EM_Pro143_276_, order0_.EM_Prouti_Sotopo as EM_Pro144_276_, order0_.EM_Prouti_Generate_Pick_Inv as EM_Pro145_276_, order0_.EM_Pricm_Order_ID as EM_Pri146_276_, order0_.EM_Prouti_Order_ID as EM_Pro147_276_, order0_.EM_Prouti_Grandtotalinitial as EM_Pro148_276_, order0_.EM_Prouti_Dateclosed as EM_Pro149_276_, order0_.EM_Prouti_Totallinesinitial as EM_Pro150_276_, order0_.EM_Prouti_Changebpartner as EM_Pro151_276_, order0_.EM_Prouti_Recalculate_Price as EM_Pro152_276_, order0_.em_prqr_execute as em_prq153_276_, order0_.EM_Prouti_Pricecalculatetdate as EM_Pro154_276_, order0_.EM_Prqr_Execute_Purchase as EM_Prq155_276_, order0_.EM_Prouti_Reactiveorder as EM_Pro156_276_, order0_.EM_Prqr_Return_Select_Prod as EM_Prq157_276_, order0_.EM_Prouti_Totalizations as EM_Pro158_276_, order0_.em_prouti_Invoiced as em_pro159_276_, order0_.em_prouti_Received as em_pro160_276_, order0_.em_prouti_initial_received as em_pro161_276_, order0_.EM_Prouti_Status_Of_Review as EM_Pro162_276_, order0_.EM_Prouti_Validate_Order as EM_Pro163_276_, order0_.EM_Prouti_Start_Review as EM_Pro164_276_, order0_.EM_Ml_Select_Product_Byattrib as EM_Ml_165_276_, order0_.EM_Prres_Reservation_ID as EM_Prr166_276_, order0_.EM_Prres_Responsible_ID as EM_Prr167_276_, order0_.EM_Prres_Diners as EM_Prr168_276_, order0_.EM_Prres_Sended as EM_Prr169_276_, order0_.EM_Prres_Printed as EM_Prr170_276_, order0_.EM_Prouti_Initial_Bp_ID as EM_Pro171_276_, order0_.EM_Prouti_Addlines_Btn as EM_Pro172_276_, order0_.EM_Prtoma_Tomaticket_ID as EM_Prt173_276_, order0_.EM_Cactl_IsCopy as EM_Cac174_276_, order0_.EM_Prtoma_Jsonorder as EM_Prt175_276_, order0_.EM_Prres_Paid_On_Credit as EM_Prr176_276_, order0_.EM_Prtoma_Grossamount as EM_Prt177_276_, order0_.EM_Cactl_Internal_Notes_Group as EM_Cac178_276_, order0_.EM_Prouti_Changebpartner_Bgt as EM_Pro179_276_, order0_.EM_Prrgr_Locator_ID as EM_Prr180_276_, order0_.EM_Paytef_Transactionreference as EM_Pay181_276_, order0_.EM_Cactl_Indirect_Cost_ID as EM_Cac182_276_, order0_.EM_Cactl_Calculate_Cost as EM_Cac183_276_, order0_.EM_Cactl_Totalcost as EM_Cac184_276_, order0_.EM_Cactl_Forceselectedproject as EM_Cac185_276_, order0_.EM_Cactl_Verified_Return as EM_Cac186_276_, order0_.EM_Cactl_Duplicate_Budget as EM_Cac187_276_, order0_.EM_Prres_Orig_Order_ID as EM_Prr188_276_, order0_.EM_Prcpr_Is_Cloned as EM_Prc189_276_, order0_.EM_Prouti_Select_Soline as EM_Pro190_276_, order0_.EM_Prouti_Return_Quantity as EM_Pro191_276_, order0_.EM_Prqr_Executecredit as EM_Prq192_276_, order0_.Em_Prqr_Credit_Purchase_ID as Em_Prq193_276_ from C_Order order0_ cross join C_DocType documentty1_ where order0_.C_DocTypeTarget_ID=documentty1_.C_DocType_ID and order0_.IsSOTrx=$42 and documentty1_.IsReturn=$43 and (order0_.AD_Org_ID in ($1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38)) and (order0_.AD_Client_ID in ($39 , $40)) order by order0_.DatePromised desc, order0_.C_Order_ID desc limit $41
f66a111527select materialmg0_.M_Production_ID as M_Produc1_526_, materialmg0_.AD_Client_ID as AD_Clien2_526_, materialmg0_.AD_Org_ID as AD_Org_I3_526_, materialmg0_.IsActive as IsActive4_526_, materialmg0_.Created as Created5_526_, materialmg0_.CreatedBy as CreatedB6_526_, materialmg0_.Updated as Updated7_526_, materialmg0_.UpdatedBy as UpdatedB8_526_, materialmg0_.Name as Name9_526_, materialmg0_.Description as Descrip10_526_, materialmg0_.MovementDate as Movemen11_526_, materialmg0_.IsCreated as IsCreat12_526_, materialmg0_.Posted as Posted13_526_, materialmg0_.Processed as Process14_526_, materialmg0_.Processing as Process15_526_, materialmg0_.AD_OrgTrx_ID as AD_OrgT16_526_, materialmg0_.C_Project_ID as C_Proje17_526_, materialmg0_.C_Campaign_ID as C_Campa18_526_, materialmg0_.C_Activity_ID as C_Activ19_526_, materialmg0_.User1_ID as User20_526_, materialmg0_.User2_ID as User21_526_, materialmg0_.DocumentNo as Documen22_526_, materialmg0_.Endtime as Endtime23_526_, materialmg0_.IsSOTrx as IsSOTrx24_526_, materialmg0_.Starttime as Startti25_526_, materialmg0_.Validating as Validat26_526_, materialmg0_.C_Costcenter_ID as C_Costc27_526_, materialmg0_.A_Asset_ID as A_Asset28_526_, materialmg0_.EM_Obbom_C_Order_ID as EM_Obbo29_526_, materialmg0_.EM_Pruti_Add_Bom_Product as EM_Prut30_526_, materialmg0_.EM_Prres_Isreturned as EM_Prre31_526_ from M_Production materialmg0_ where materialmg0_.IsSOTrx=$42 and (materialmg0_.AD_Org_ID in ($1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38)) and (materialmg0_.AD_Client_ID in ($39 , $40)) order by materialmg0_.MovementDate desc, materialmg0_.M_Production_ID desc limit $41
9fe6110436select 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_ left outer join C_BPartner businesspa1_ on order0_.C_BPartner_ID=businesspa1_.C_BPartner_ID cross join C_DocType documentty2_ where order0_.C_DocTypeTarget_ID=documentty2_.C_DocType_ID and order0_.IsSOTrx=$42 and documentty2_.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 businesspa1_.Value desc, businesspa1_.Name desc, businesspa1_.TaxID desc, businesspa1_.Name2 desc, order0_.C_Order_ID desc limit $41
67e57d4c88insert into ad_context_info (ad_user_id, ad_session_id, processType, processId) values ($1, $2, $3, $4)
00c98130c9select materialmg0_.M_Transaction_ID as M_Transa1_558_, materialmg0_.AD_Client_ID as AD_Clien2_558_, materialmg0_.AD_Org_ID as AD_Org_I3_558_, materialmg0_.IsActive as IsActive4_558_, materialmg0_.Created as Created5_558_, materialmg0_.CreatedBy as CreatedB6_558_, materialmg0_.Updated as Updated7_558_, materialmg0_.UpdatedBy as UpdatedB8_558_, materialmg0_.MovementType as Movement9_558_, materialmg0_.M_Locator_ID as M_Locat10_558_, materialmg0_.M_Product_ID as M_Produ11_558_, materialmg0_.MovementDate as Movemen12_558_, materialmg0_.MovementQty as Movemen13_558_, materialmg0_.M_InventoryLine_ID as M_Inven14_558_, materialmg0_.M_MovementLine_ID as M_Movem15_558_, materialmg0_.M_InOutLine_ID as M_InOut16_558_, materialmg0_.M_ProductionLine_ID as M_Produ17_558_, materialmg0_.C_ProjectIssue_ID as C_Proje18_558_, materialmg0_.M_AttributeSetInstance_ID as M_Attri19_558_, materialmg0_.M_Product_Uom_Id as M_Produ20_558_, materialmg0_.QuantityOrder as Quantit21_558_, materialmg0_.C_UOM_ID as C_UOM_I22_558_, materialmg0_.M_Internal_Consumptionline_ID as M_Inter23_558_, materialmg0_.TransactionCost as Transac24_558_, materialmg0_.TrxProcessDate as TrxProc25_558_, materialmg0_.M_Costing_Algorithm_ID as M_Costi26_558_, materialmg0_.IsCostCalculated as IsCostC27_558_, materialmg0_.C_Currency_ID as C_Curre28_558_, materialmg0_.Costing_Status as Costing29_558_, materialmg0_.Checkreservedqty as Checkre30_558_, materialmg0_.Isprocessed as Isproce31_558_, materialmg0_.Checkpricedifference as Checkpr32_558_, materialmg0_.EM_Prouti_Exported as EM_Prou33_558_, materialmg0_.Manualcostadjustment as Manualc34_558_, materialmg0_.IsCostPermanent as IsCostP35_558_, materialmg0_.EM_Pricm_Inoutline_ID as EM_Pric36_558_ from M_Transaction materialmg0_ inner join AD_Org organizati1_ on materialmg0_.AD_Org_ID=organizati1_.AD_Org_ID where materialmg0_.M_Product_ID=$1 and (materialmg0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (materialmg0_.AD_Client_ID in ($40 , $41)) order by organizati1_.Name, materialmg0_.M_Transaction_ID limit $42
a065237476select cactl_vari0_.Cactl_Variety_Product_ID as Cactl_Va1_366_, cactl_vari0_.AD_Client_ID as AD_Clien2_366_, cactl_vari0_.AD_Org_ID as AD_Org_I3_366_, cactl_vari0_.Isactive as Isactive4_366_, cactl_vari0_.Created as Created5_366_, cactl_vari0_.Createdby as Createdb6_366_, cactl_vari0_.Updated as Updated7_366_, cactl_vari0_.Updatedby as Updatedb8_366_, cactl_vari0_.M_Product_ID as M_Produc9_366_, cactl_vari0_.C_Bpartner_ID as C_Bpart10_366_, cactl_vari0_.C_Uom_ID as C_Uom_I11_366_, cactl_vari0_.Price as Price12_366_, cactl_vari0_.Cactl_Variety_ID as Cactl_V13_366_, cactl_vari0_.Pricelist as Priceli14_366_, cactl_vari0_.Date_From as Date_Fr15_366_, cactl_vari0_.Date_To as Date_To16_366_, cactl_vari0_.Vendorproductno as Vendorp17_366_, cactl_vari0_.Iscurrentvendor as Iscurre18_366_, cactl_vari0_.Isprocessing as Isproce19_366_ from cactl_variety_product cactl_vari0_ left outer join C_BPartner businesspa1_ on cactl_vari0_.C_Bpartner_ID=businesspa1_.C_BPartner_ID left outer join C_UOM uom2_ on cactl_vari0_.C_Uom_ID=uom2_.C_UOM_ID left outer join cactl_variety cactl_vari3_ on cactl_vari0_.Cactl_Variety_ID=cactl_vari3_.Cactl_Variety_ID where (cactl_vari0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41)) and (cactl_vari0_.AD_Client_ID in ($1 , $2)) and cactl_vari0_.Isactive=$42 order by businesspa1_.Value, businesspa1_.Name, businesspa1_.TaxID, businesspa1_.Name2, uom2_.Name, cactl_vari0_.Price, cactl_vari3_.Name, cactl_vari3_.Value, cactl_vari0_.Cactl_Variety_Product_ID limit $3
4a3e0e1397select businesspa0_.C_BPartner_ID as C_BPartn1_203_, businesspa0_.AD_Client_ID as AD_Clien2_203_, businesspa0_.AD_Org_ID as AD_Org_I3_203_, businesspa0_.IsActive as IsActive4_203_, businesspa0_.Created as Created5_203_, businesspa0_.CreatedBy as CreatedB6_203_, businesspa0_.Updated as Updated7_203_, businesspa0_.UpdatedBy as UpdatedB8_203_, businesspa0_.Value as Value9_203_, businesspa0_.Name as Name10_203_, businesspa0_.Name2 as Name11_203_, businesspa0_.Description as Descrip12_203_, businesspa0_.IsSummary as IsSumma13_203_, businesspa0_.C_BP_Group_ID as C_BP_Gr14_203_, businesspa0_.IsOneTime as IsOneTi15_203_, businesspa0_.IsProspect as IsProsp16_203_, businesspa0_.IsVendor as IsVendo17_203_, businesspa0_.IsCustomer as IsCusto18_203_, businesspa0_.IsEmployee as IsEmplo19_203_, businesspa0_.IsSalesRep as IsSales20_203_, businesspa0_.ReferenceNo as Referen21_203_, businesspa0_.DUNS as DUNS22_203_, businesspa0_.URL as URL23_203_, businesspa0_.AD_Language as AD_Lang24_203_, businesspa0_.TaxID as TaxID25_203_, businesspa0_.IsTaxExempt as IsTaxEx26_203_, businesspa0_.C_InvoiceSchedule_ID as C_Invoi27_203_, businesspa0_.Rating as Rating28_203_, businesspa0_.SalesVolume as SalesVo29_203_, businesspa0_.NumberEmployees as NumberE30_203_, businesspa0_.NAICS as NAICS31_203_, businesspa0_.FirstSale as FirstSa32_203_, businesspa0_.AcqusitionCost as Acqusit33_203_, businesspa0_.PotentialLifeTimeValue as Potenti34_203_, businesspa0_.ActualLifeTimeValue as ActualL35_203_, businesspa0_.ShareOfCustomer as ShareOf36_203_, businesspa0_.PaymentRule as Payment37_203_, businesspa0_.SO_CreditLimit as SO_Cred38_203_, businesspa0_.SO_CreditUsed as SO_Cred39_203_, businesspa0_.C_PaymentTerm_ID as C_Payme40_203_, businesspa0_.M_PriceList_ID as M_Price41_203_, businesspa0_.IsDiscountPrinted as IsDisco42_203_, businesspa0_.SO_Description as SO_Desc43_203_, businesspa0_.POReference as PORefer44_203_, businesspa0_.PaymentRulePO as Payment45_203_, businesspa0_.PO_PriceList_ID as PO_Pric46_203_, businesspa0_.PO_PaymentTerm_ID as PO_Paym47_203_, businesspa0_.DocumentCopies as Documen48_203_, businesspa0_.C_Greeting_ID as C_Greet49_203_, businesspa0_.InvoiceRule as Invoice50_203_, businesspa0_.DeliveryRule as Deliver51_203_, businesspa0_.DeliveryViaRule as Deliver52_203_, businesspa0_.SalesRep_ID as SalesRe53_203_, businesspa0_.BPartner_Parent_ID as BPartne54_203_, businesspa0_.SOCreditStatus as SOCredi55_203_, businesspa0_.AD_Forced_Org_ID as AD_Forc56_203_, businesspa0_.ShowPriceInOrder as ShowPri57_203_, businesspa0_.Invoicegrouping as Invoice58_203_, businesspa0_.FixMonthDay as FixMont59_203_, businesspa0_.FixMonthDay2 as FixMont60_203_, businesspa0_.Fixmonthday3 as Fixmont61_203_, businesspa0_.Isworker as Isworke62_203_, businesspa0_.UPC as UPC63_203_, businesspa0_.C_Salary_Category_ID as C_Salar64_203_, businesspa0_.Invoice_Printformat as Invoice65_203_, businesspa0_.Last_Days as Last_Da66_203_, businesspa0_.PO_Bankaccount_ID as PO_Bank67_203_, businesspa0_.PO_BP_TaxCategory_ID as PO_BP_T68_203_, businesspa0_.PO_Fixmonthday as PO_Fixm69_203_, businesspa0_.PO_Fixmonthday2 as PO_Fixm70_203_, businesspa0_.PO_Fixmonthday3 as PO_Fixm71_203_, businesspa0_.SO_Bankaccount_ID as SO_Bank72_203_, businesspa0_.SO_Bp_Taxcategory_ID as SO_Bp_T73_203_, businesspa0_.Fiscalcode as Fiscalc74_203_, businesspa0_.Isofiscalcode as Isofisc75_203_, businesspa0_.EM_Einv_Einvoice as EM_Einv76_203_, businesspa0_.PO_C_Incoterms_ID as PO_C_In77_203_, businesspa0_.EM_Einv_Format_Id as EM_Einv78_203_, businesspa0_.SO_C_Incoterms_ID as SO_C_In79_203_, businesspa0_.EM_Einv_Platform_Id as EM_Einv80_203_, businesspa0_.FIN_Paymentmethod_ID as FIN_Pay81_203_, businesspa0_.EM_Einv_Email as EM_Einv82_203_, businesspa0_.PO_Paymentmethod_ID as PO_Paym83_203_, businesspa0_.FIN_Financial_Account_ID as FIN_Fin84_203_, businesspa0_.EM_Einv_Deliverymode as EM_Einv85_203_, businesspa0_.PO_Financial_Account_ID as PO_Fina86_203_, businesspa0_.Customer_Blocking as Custome87_203_, businesspa0_.Vendor_Blocking as Vendor_88_203_, businesspa0_.SO_Payment_Blocking as SO_Paym89_203_, businesspa0_.PO_Payment_Blocking as PO_Paym90_203_, businesspa0_.SO_Invoice_Blocking as SO_Invo91_203_, businesspa0_.PO_Invoice_Blocking as PO_Invo92_203_, businesspa0_.SO_Order_Blocking as SO_Orde93_203_, businesspa0_.PO_Order_Blocking as PO_Orde94_203_, businesspa0_.SO_Goods_Blocking as SO_Good95_203_, businesspa0_.PO_Goods_Blocking as PO_Good96_203_, businesspa0_.Iscashvat as Iscashv97_203_, businesspa0_.EM_Advcrm_Newactivity as EM_Advc98_203_, businesspa0_.Update_Currency as Update_99_203_, businesspa0_.BP_Currency_ID as BP_Cur100_203_, businesspa0_.Birthplace as Birthp101_203_, businesspa0_.Birthday as Birthd102_203_, businesspa0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_203_, businesspa0_.Is_Customer_Consent as Is_Cus104_203_, businesspa0_.EM_OBSMAIL_INVOICEVIAEMAIL as EM_OBS105_203_, businesspa0_.EM_Obsepad_Mandate_Identifier as EM_Obs106_203_, businesspa0_.EM_Obsmail_Language as EM_Obs107_203_, businesspa0_.EM_Obsepad_Mandate_Date as EM_Obs108_203_, businesspa0_.EM_Aeatsii_Rep_Taxid as EM_Aea109_203_, businesspa0_.EM_Aeatsii_Menor as EM_Aea110_203_, businesspa0_.EM_Pricm_Isintercompany as EM_Pri111_203_, businesspa0_.EM_Psat_Billtobpartner_ID as EM_Psa112_203_, businesspa0_.EM_Psat_Locator_ID as EM_Psa113_203_, businesspa0_.EM_Psat_Mobile_Request as EM_Psa114_203_, businesspa0_.EM_Prges_Glitem_ID as EM_Prg115_203_, businesspa0_.EM_Rrhh_Exemployee as EM_Rrh116_203_, businesspa0_.EM_Rrhh_Candidate as EM_Rrh117_203_, businesspa0_.EM_Prpass_No_Print_Pass as EM_Prp118_203_, businesspa0_.EM_Rrhh_Holidays_Supervisor as EM_Rrh119_203_, businesspa0_.EM_Cactal_Emp_No as EM_Cac120_203_, businesspa0_.EM_Cactal_Emp_Relationship_No as EM_Cac121_203_, businesspa0_.EM_Obwpl_Bp_Block_Pickinglist as EM_Obw122_203_, businesspa0_.EM_Pruti_Addbp as EM_Pru123_203_, businesspa0_.EM_Prpass_Generatepassemployee as EM_Prp124_203_, businesspa0_.EM_Rrhh_Mainworkstation_ID as EM_Rrh125_203_, businesspa0_.EM_Rrhh_Bp_Transfer_Code as EM_Rrh126_203_, businesspa0_.EM_OBTIK_Tax_ID_Key as EM_OBT127_203_ from C_BPartner businesspa0_ where exists (select $3 from C_Order order1_ inner join C_BPartner businesspa2_ on order1_.C_BPartner_ID=businesspa2_.C_BPartner_ID where (upper((order1_.DocumentNo||$4||coalesce(to_char(order1_.DateOrdered), $5)||$6||coalesce(to_char(order1_.GrandTotal), $7))) like upper($1) escape $8) and businesspa2_.C_BPartner_ID=businesspa0_.C_BPartner_ID and (order1_.AD_Org_ID in ($9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41 , $42 , $43 , $44 , $45 , $46)) and (order1_.AD_Client_ID in ($47 , $48))) order by businesspa0_.Value, businesspa0_.Name, businesspa0_.TaxID, businesspa0_.Name2 limit $2
4d81be31ddselect count(*) as col_0_0_, sum(order0_.GrandTotal) as col_1_0_ 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 (documentty1_.DocSubTypeSO not like $45) and (order0_.Updated>$1 or order0_.Processed=$46) 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)) limit $42
bb66bde6a9select 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_ inner join AD_Org organizati1_ on materialmg0_.AD_Org_ID=organizati1_.AD_Org_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_.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 organizati1_.Name desc, materialmg0_.M_InOut_ID desc limit $41 offset $42
f570d33a96SELECT * FROM (select f.c_invoice_id as referencekey_id, $2 as ad_role_id, $3 as ad_user_id, $4 || f.documentno|| $5 as description, $6 as isActive, f.ad_org_id, f.ad_client_id, now() as created, $7 as createdBy, now() as updated, $8 as updatedBy, ad_column_identifier($9, f.c_invoice_id, $10) AS RECORD_ID FROM ( select ci.documentno, max(dateinvoiced) as dateinvoiced, max(ci.c_invoice_id) as c_invoice_id, max(ci.ad_org_id) as ad_org_id, max(ci.ad_client_id) as ad_client_id from c_invoice ci join c_order co on co.c_order_id=ci.c_order_id where ci.issotrx=$11 and co.em_obpos_applications_id is not null and ci.dateinvoiced >= current_date - $12 group by ci.documentno, EXTRACT($13 FROM dateinvoiced), ci.c_doctype_id having count(ci.documentno)>$14 order by max(dateinvoiced) desc ) as f) AAA where not exists (select $15 from ad_alert a where a.ad_alertrule_id = $1 and a.referencekey_id = aaa.referencekey_id and coalesce(a.status, $16) != $17)
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='Y' 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
83a936f681insert into ad_context_info (ad_user_id, ad_session_id, processType, processId) values ($1, $2, $3, $4)
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)
18c54477aaSELECT * FROM (select aat.ad_audit_trail_id as referencekey_id, $2 as ad_role_id, $3 as ad_user_id, $4 || co.documentno || $5 || us."name" || $6||co.updated as description, $7 as isActive, aat.ad_org_id, aat.ad_client_id, now() as created, $8 as createdBy, now() as updated, $9 as updatedBy, ad_column_identifier($10, co.c_order_id, $11) AS RECORD_ID from ad_audit_trail aat left join c_order co on co.c_order_id=aat.record_id left join c_doctype cd on cd.c_doctype_id=co.c_doctype_id left join ad_user us on us.ad_user_id= co.updatedby where aat.old_char=$12 and aat.new_char=$13 and co.docstatus = $14 and aat.event_time >= current_date -$15 and cd.em_prres_restaurant=$16) AAA where not exists (select $17 from ad_alert a where a.ad_alertrule_id = $1 and a.referencekey_id = aaa.referencekey_id and coalesce(a.status, $18) != $19)
2ea6727409select sum(invoice0_.GrandTotal) as col_0_0_ from C_Invoice invoice0_ where invoice0_.DateAcct>=$1 and invoice0_.DateAcct<=$2 and invoice0_.DocStatus=$3 and invoice0_.IsSOTrx=$45 and invoice0_.DocStatus<>$46 and (invoice0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41)) and (invoice0_.AD_Client_ID in ($42 , $43)) limit $44
281ee3922aSELECT $2 FROM ONLY "public"."c_order" x WHERE "c_order_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
b32c4689a3insert into ad_context_info (ad_user_id, ad_session_id, processType, processId) values ($1, $2, $3, $4)
fa5e805d20insert into M_Transaction (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, MovementType, M_Locator_ID, M_Product_ID, MovementDate, MovementQty, M_ProductionLine_ID, M_AttributeSetInstance_ID, C_UOM_ID, TrxProcessDate, IsCostCalculated, Costing_Status, Checkreservedqty, Isprocessed, Checkpricedifference, EM_Prouti_Exported, Manualcostadjustment, IsCostPermanent, M_Transaction_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25)
1ac0a3f4b1select 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_ left outer join C_BPartner businesspa1_ on order0_.C_BPartner_ID=businesspa1_.C_BPartner_ID cross join C_DocType documentty2_ where order0_.C_DocTypeTarget_ID=documentty2_.C_DocType_ID and (upper(order0_.DocumentNo) like upper($1) escape $43) and order0_.IsSOTrx=$44 and documentty2_.IsReturn=$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 businesspa1_.Value desc, businesspa1_.Name desc, businesspa1_.TaxID desc, businesspa1_.Name2 desc, order0_.C_Order_ID desc limit $42
10410964a2SELECT $2 FROM ONLY "public"."ad_org" x WHERE "ad_org_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
185ba8cb63select f.id, f.hour, CASE WHEN f.reservation_type = $1 AND f.multiplier is not null THEN f.available * f.multiplier ELSE f.available END as available, CASE WHEN f.reservation_type = $2 AND f.multiplier is not null THEN f.reserved * f.multiplier ELSE f.reserved END as reserved, f.slot_type FROM ( select ptd.prpass_timeslots_detail_id as id, to_char(ptd.hour, $3) as hour, coalesce( (select qtyavailable from prpass_timeslots_exceptions pte where pte.prpass_timeslots_id = ptd.prpass_timeslots_id and (ptd.hour is null OR (to_char(pte.hour, $4) = to_char(ptd.hour, $5))) and pte.date = $6::date), CASE WHEN (EXTRACT($7 FROM ($8::timestamp - CURRENT_DATE)) / $9 >= pt.agency_reservation_time) OR (ptd.qtyavailable_agency > $10 AND pt.agency_reservation_time is null) THEN CASE WHEN $11 THEN COALESCE(ptd.qtyavailable_agency, COALESCE(ptd.qtyavailable_online, qtyavailable)) WHEN $12 AND ptd.qtyavailable_online = $13 THEN ptd.qtyavailable_online ELSE (COALESCE(ptd.qtyavailable_online, qtyavailable)) - ptd.qtyavailable_agency END ELSE CASE WHEN pt.slot_type = $14 AND $15 THEN COALESCE(ptd.qtyavailable_online, ptd.qtyavailable) ELSE ptd.qtyavailable END END) as available, coalesce( (select sum( CASE WHEN pt.reservation_type = $16 AND f.cart is not null AND pt.multiplier is not null THEN floor((f.qtyreservation + pt.multiplier - $17) / pt.multiplier) ELSE f.qtyreservation END) from( select count(ppi.prpass_pass_inst_id) as qtyreservation, cart from prpass_timeslots_res ptr left join c_orderline col on col.c_orderline_id = ptr.c_orderline_id left join c_order co on co.c_order_id = col.c_order_id left join prpass_pass_inst ppi on ppi.c_orderline_id = col.c_orderline_id where ptr.prpass_timeslots_detail_id = ptd.prpass_timeslots_detail_id and ptr.date = $18::date and (pt.slot_type <> $19 or (pt.slot_type = $20 and CASE WHEN $21 THEN co.em_obpos_applications_id is null OR ptr.c_orderline_id is null ELSE co.em_obpos_applications_id is not null OR ptr.c_orderline_id is null END)) and (CASE WHEN (EXTRACT($22 FROM (ptr.date - CURRENT_DATE)) / $23 >= pt.agency_reservation_time) OR (ptd.qtyavailable_agency > $24 AND pt.agency_reservation_time is null) THEN CASE WHEN $25 THEN ptr.agency = $26 ELSE ptr.agency = $27 END ELSE $28 END) and cart is not null group by cart ) as f), $29) as reserved, pt.multiplier, pt.reservation_type, pt.slot_type from prpass_timeslots_detail ptd join prpass_timeslots pt on pt.prpass_timeslots_id = ptd.prpass_timeslots_id where ptd.prpass_timeslots_id = $30 order by 2 asc) AS f
7e62f3b264select cactl_vari0_.Cactl_Variety_Product_ID as Cactl_Va1_366_, cactl_vari0_.AD_Client_ID as AD_Clien2_366_, cactl_vari0_.AD_Org_ID as AD_Org_I3_366_, cactl_vari0_.Isactive as Isactive4_366_, cactl_vari0_.Created as Created5_366_, cactl_vari0_.Createdby as Createdb6_366_, cactl_vari0_.Updated as Updated7_366_, cactl_vari0_.Updatedby as Updatedb8_366_, cactl_vari0_.M_Product_ID as M_Produc9_366_, cactl_vari0_.C_Bpartner_ID as C_Bpart10_366_, cactl_vari0_.C_Uom_ID as C_Uom_I11_366_, cactl_vari0_.Price as Price12_366_, cactl_vari0_.Cactl_Variety_ID as Cactl_V13_366_, cactl_vari0_.Pricelist as Priceli14_366_, cactl_vari0_.Date_From as Date_Fr15_366_, cactl_vari0_.Date_To as Date_To16_366_, cactl_vari0_.Vendorproductno as Vendorp17_366_, cactl_vari0_.Iscurrentvendor as Iscurre18_366_, cactl_vari0_.Isprocessing as Isproce19_366_ from cactl_variety_product cactl_vari0_ left outer join C_BPartner businesspa1_ on cactl_vari0_.C_Bpartner_ID=businesspa1_.C_BPartner_ID left outer join C_UOM uom2_ on cactl_vari0_.C_Uom_ID=uom2_.C_UOM_ID left outer join cactl_variety cactl_vari3_ on cactl_vari0_.Cactl_Variety_ID=cactl_vari3_.Cactl_Variety_ID where (cactl_vari0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8 , $9 , $10)) and (cactl_vari0_.AD_Client_ID in ($1 , $2)) and cactl_vari0_.Isactive=$11 order by businesspa1_.Value, businesspa1_.Name, businesspa1_.TaxID, businesspa1_.Name2, uom2_.Name, cactl_vari0_.Price, cactl_vari3_.Name, cactl_vari3_.Value, cactl_vari0_.Cactl_Variety_Product_ID limit $3
8ec2df7b9dselect cactl_vari0_.Cactl_Variety_Product_ID as Cactl_Va1_366_, cactl_vari0_.AD_Client_ID as AD_Clien2_366_, cactl_vari0_.AD_Org_ID as AD_Org_I3_366_, cactl_vari0_.Isactive as Isactive4_366_, cactl_vari0_.Created as Created5_366_, cactl_vari0_.Createdby as Createdb6_366_, cactl_vari0_.Updated as Updated7_366_, cactl_vari0_.Updatedby as Updatedb8_366_, cactl_vari0_.M_Product_ID as M_Produc9_366_, cactl_vari0_.C_Bpartner_ID as C_Bpart10_366_, cactl_vari0_.C_Uom_ID as C_Uom_I11_366_, cactl_vari0_.Price as Price12_366_, cactl_vari0_.Cactl_Variety_ID as Cactl_V13_366_, cactl_vari0_.Pricelist as Priceli14_366_, cactl_vari0_.Date_From as Date_Fr15_366_, cactl_vari0_.Date_To as Date_To16_366_, cactl_vari0_.Vendorproductno as Vendorp17_366_, cactl_vari0_.Iscurrentvendor as Iscurre18_366_, cactl_vari0_.Isprocessing as Isproce19_366_ from cactl_variety_product cactl_vari0_ left outer join C_BPartner businesspa1_ on cactl_vari0_.C_Bpartner_ID=businesspa1_.C_BPartner_ID left outer join C_UOM uom2_ on cactl_vari0_.C_Uom_ID=uom2_.C_UOM_ID left outer join cactl_variety cactl_vari3_ on cactl_vari0_.Cactl_Variety_ID=cactl_vari3_.Cactl_Variety_ID where (cactl_vari0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8)) and (cactl_vari0_.AD_Client_ID in ($1 , $2)) and cactl_vari0_.Isactive=$9 order by businesspa1_.Value, businesspa1_.Name, businesspa1_.TaxID, businesspa1_.Name2, uom2_.Name, cactl_vari0_.Price, cactl_vari3_.Name, cactl_vari3_.Value, cactl_vari0_.Cactl_Variety_Product_ID limit $3
98d4183d4bvacuum analyze C_Import_Entry_Archive
e1739d379dCOPY public.c_invoice (c_invoice_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, issotrx, documentno, docstatus, docaction, processing, processed, posted, c_doctype_id, c_doctypetarget_id, c_order_id, description, isprinted, salesrep_id, dateinvoiced, dateprinted, dateacct, c_bpartner_id, c_bpartner_location_id, poreference, isdiscountprinted, dateordered, c_currency_id, c_paymentterm_id, c_charge_id, chargeamt, totallines, grandtotal, m_pricelist_id, istaxincluded, c_campaign_id, c_project_id, c_activity_id, createfrom, generateto, ad_user_id, copyfrom, isselfservice, ad_orgtrx_id, user1_id, user2_id, withholdingamount, taxdate, c_withholding_id, ispaid, totalpaid, outstandingamt, daystilldue, dueamt, lastcalculatedondate, fin_paymentmethod_id, fin_payment_priority_id, finalsettlement, daysoutstanding, percentageoverdue, c_costcenter_id, calculate_promotions, a_asset_id, iscashvat, prepaymentamt, createfromorders, createfrominouts, em_aprm_addpayment, em_aprm_processinvoice, paidamtatinvoicing, bpartner_extref, em_einv_generated, em_einv_sent, em_aeatsii_send, em_aeatsii_issent, em_aeatsii_fecha_operacion, em_aeatsii_clave_tipo, em_aeatsii_motivo_rectif, em_aeatsii_clave_tipo_fc, em_aeatsii_tipo_rectif, em_aeatsii_dua, em_aeatsii_fecha_dua, em_aeatsii_estado, em_aeatsii_error_registral, em_aeatsii_modif, em_aeatsii_modified, em_aeatsii_description_id, em_aeatsii_descripcion_sii, em_aeatsii_fecha_reg_cont, em_aeatsii_dup, em_aeatsii_error_code, em_aeatsii_error_msg, em_aeatsii_unsubscribe, em_aeatsii_pur_description_id, em_aeatsii_multi_dua, em_aeatsii_ejercicio, em_aeatsii_periodo, em_aeatsii_autofactura, em_aeatsii_invoice_id, em_aeatsii_insiidate, em_aeatsii_cause_exemption_id, em_aeatsii_isauthorization, em_aeatsii_authorizationno, em_obpos_rounding_amount, em_ml_select_product, em_prouti_recalculate_price, em_prouti_pricecalculatetdate, em_prouti_totalizations, em_obcma_c_poc_email_id, em_obpos_sequencename, em_obpos_sequencenumber, em_advcrm_newactivity, em_priuti_createpurchinv, em_priuti_generated, em_priuti_date_complete, em_priuti_user_complete_id, em_priuti_status_of_review, em_priuti_validate, em_priuti_start_review, em_prges_expediente_id, em_prges_annotation_id, em_prges_record_number, em_prges_grantotal, em_sgpcrm_securitygroups_id, em_prges_poreference, em_cactl_createfromship) TO stdout
1b89da5cecBEGIN
b4d6b6665eSELECT * FROM (select inst.prpass_pass_inst_id AS referencekey_id, inst.value AS record_id, $2 AS ad_role_id, $3 AS ad_user_id, $4||inst.value AS description, $5 AS isActive, inst.ad_org_id, inst.ad_client_id, now() AS created, $6 AS createdBy, now() AS updated, $7 AS updatedBy from prpass_pass_inst inst where value IN ( select value from prpass_pass_inst where created >= current_date - $8 group by value having count(value) > $9 )) AAA where not exists (select $10 from ad_alert a where a.ad_alertrule_id = $1 and a.referencekey_id = aaa.referencekey_id and coalesce(a.status, $11) != $12)
67a75a3409COPY public.fact_acct (fact_acct_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, c_acctschema_id, account_id, datetrx, dateacct, c_period_id, ad_table_id, record_id, line_id, gl_category_id, c_tax_id, m_locator_id, postingtype, c_currency_id, amtsourcedr, amtsourcecr, amtacctdr, amtacctcr, c_uom_id, qty, m_product_id, c_bpartner_id, ad_orgtrx_id, c_locfrom_id, c_locto_id, c_salesregion_id, c_project_id, c_campaign_id, c_activity_id, user1_id, user2_id, description, a_asset_id, fact_acct_group_id, seqno, factaccttype, docbasetype, acctvalue, acctdescription, record_id2, c_withholding_id, c_doctype_id, c_costcenter_id, ismodify, datebalanced) TO stdout
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
ef907626c8SELECT v_lines>$6 and (select docstatus from c_order where c_order_id=orderid)=$7
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
e17f13e4acselect 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_.DocumentNo, order0_.C_Order_ID limit $41
d2416a9e98select 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_.MovementQty, materialmg0_.M_Transaction_ID limit $42
74a616a7b1select a.id, ev.value as account_id, ev.name, a.initialamt as SALDO_INICIAL, a.amtacctcr, a.amtacctdr, A.INITIALAMT+A.AMTACCTDR-A.AMTACCTCR AS SALDO_FINAL, a.groupbyid, CASE ad_column_identifier ($17,groupbyid,TO_CHAR($1)) WHEN $18 THEN $19 ELSE ad_column_identifier ($20,groupbyid,TO_CHAR($2)) END AS groupbyname from( SELECT sum(case when (DATEACCT < TO_DATE($3) or (DATEACCT = TO_DATE($4) and F.FACTACCTTYPE = $5)) then F.AMTACCTDR - F.AMTACCTCR else $21 end) as initialamt, sum(case when (DATEACCT >= TO_DATE($6) AND F.FACTACCTTYPE not in($22, $23, $24)) or (DATEACCT = TO_DATE($7) and F.FACTACCTTYPE = $8) then F.AMTACCTDR else $25 end) as AMTACCTDR, sum(case when (DATEACCT >= TO_DATE($9) AND F.FACTACCTTYPE not in($26, $27, $28)) or (DATEACCT = TO_DATE($10) and F.FACTACCTTYPE = $11) then F.AMTACCTCR else $29 end) as AMTACCTCR, F.ACCOUNT_ID AS ID, to_char($30) AS groupbyid FROM FACT_ACCT F WHERE F.AD_ORG_ID IN($31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66) AND F.AD_CLIENT_ID IN($67,$68) AND F.AD_ORG_ID IN ($69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106) AND DATEACCT < TO_DATE($12) AND $107=$108 AND F.C_ACCTSCHEMA_ID = $13 AND F.ISACTIVE=$109 group by F.ACCOUNT_ID ) a, c_elementvalue ev where a.id = ev.c_elementvalue_id and ev.elementlevel = $14 AND $110=$111 AND EV.VALUE >= $15 AND EV.VALUE <= $16 and (a.initialamt <>$112 or a.amtacctcr <>$113 or a.amtacctdr<>$114) order by ev.value, ev.name, id, groupbyname
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)
3448f4b5f7SELECT coalesce(( select ol.qtyordered - coalesce(sum(abs(coalesce(( select sum(il.movementqty) from m_inoutline il left join m_inout i on i.m_inout_id=il.m_inout_id where i.docstatus<>$2 and il.c_orderline_id=ol.c_orderline_id ),$3))), $4) restante from c_orderline ol where ol.c_orderline_id=p_record_id group by ol.c_orderline_id), $5)
132ce48f1dSELECT COUNT( DISTINCT $4 || C_BPARTNER.C_BPARTNER_ID || M_INOUT.M_INOUT_ID || AD_ORG.AD_ORG_ID ) AS COUNT FROM M_INOUTLINE left join C_ORDERLINE on M_INOUTLINE.C_ORDERLINE_ID = C_ORDERLINE.C_ORDERLINE_ID , M_INOUT left join AD_USER on M_INOUT.SALESREP_ID = AD_USER.AD_USER_ID, C_BPARTNER left join C_BPARTNER CB on C_BPARTNER.SALESREP_ID = CB.C_BPARTNER_ID, C_BP_GROUP, M_PRODUCT, M_PRODUCT_CATEGORY, M_WAREHOUSE, C_UOM, AD_ORG WHERE M_INOUT.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID AND C_BPARTNER.C_BP_GROUP_ID = C_BP_GROUP.C_BP_GROUP_ID AND M_INOUT.M_INOUT_ID = M_INOUTLINE.M_INOUT_ID AND M_INOUTLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID AND M_PRODUCT.M_PRODUCT_CATEGORY_ID = M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID AND M_INOUT.M_WAREHOUSE_ID = M_WAREHOUSE.M_WAREHOUSE_ID AND M_INOUTLINE.C_UOM_ID = C_UOM.C_UOM_ID AND M_INOUT.AD_ORG_ID = AD_ORG.AD_ORG_ID AND M_INOUT.ISSOTRX = $5 AND M_INOUT.PROCESSED = $6 AND $7=$8 AND M_INOUT.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 M_INOUT.AD_CLIENT_ID IN ($47,$48) AND $49=$50 AND C_BP_GROUP.C_BP_GROUP_ID = $1 AND $51=$52 AND M_INOUT.MOVEMENTDATE >= TO_DATE($2) AND M_INOUT.MOVEMENTDATE < TO_DATE($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
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
075d776740select 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||$4||businesspa0_.Name||$5||coalesce(to_char(businesspa0_.TaxID), $6)||$7||coalesce(to_char(businesspa0_.Name2), $8))) like upper($1) escape $9) and (exists (select $10 from C_Invoice invoice1_ inner join C_BPartner businesspa2_ on invoice1_.C_BPartner_ID=businesspa2_.C_BPartner_ID where invoice1_.IsSOTrx=$11 and invoice1_.DocStatus<>$12 and (invoice1_.Updated>$2 or invoice1_.Processed=$13) and businesspa2_.C_BPartner_ID=businesspa0_.C_BPartner_ID and (invoice1_.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 (invoice1_.AD_Client_ID in ($52 , $53)))) order by businesspa0_.Value, businesspa0_.Name, businesspa0_.TaxID, businesspa0_.Name2 limit $3
7247cdc8b5select c_import_e0_.C_IMPORT_ENTRY_ID as C_IMPORT1_257_, c_import_e0_.AD_Client_ID as AD_Clien2_257_, c_import_e0_.AD_Org_ID as AD_Org_I3_257_, c_import_e0_.Isactive as Isactive4_257_, c_import_e0_.Created as Created5_257_, c_import_e0_.Createdby as Createdb6_257_, c_import_e0_.Updated as Updated7_257_, c_import_e0_.Updatedby as Updatedb8_257_, c_import_e0_.Imported as Imported9_257_, c_import_e0_.Jsoninfo as Jsoninf10_257_, c_import_e0_.ImportStatus as ImportS11_257_, c_import_e0_.Typeofdata as Typeofd12_257_, c_import_e0_.Errorinfo as Errorin13_257_, c_import_e0_.AD_Role_ID as AD_Role14_257_, c_import_e0_.Createdtimestamp as Created15_257_, c_import_e0_.EM_Obpos_Applications_ID as EM_Obpo16_257_, c_import_e0_.Responseinfo as Respons17_257_ from C_IMPORT_ENTRY c_import_e0_ where c_import_e0_.Typeofdata=$1 and c_import_e0_.ImportStatus=$3 order by c_import_e0_.Created, c_import_e0_.Createdtimestamp limit $2
5c9cd00b05select invoice0_.C_Invoice_ID as C_Invoic1_260_, invoice0_.AD_Client_ID as AD_Clien2_260_, invoice0_.AD_Org_ID as AD_Org_I3_260_, invoice0_.IsActive as IsActive4_260_, invoice0_.Created as Created5_260_, invoice0_.CreatedBy as CreatedB6_260_, invoice0_.Updated as Updated7_260_, invoice0_.UpdatedBy as UpdatedB8_260_, invoice0_.IsSOTrx as IsSOTrx9_260_, invoice0_.DocumentNo as Documen10_260_, invoice0_.DocStatus as DocStat11_260_, invoice0_.DocAction as DocActi12_260_, invoice0_.Processing as Process13_260_, invoice0_.Processed as Process14_260_, invoice0_.Posted as Posted15_260_, invoice0_.C_DocType_ID as C_DocTy16_260_, invoice0_.C_DocTypeTarget_ID as C_DocTy17_260_, invoice0_.C_Order_ID as C_Order18_260_, invoice0_.Description as Descrip19_260_, invoice0_.IsPrinted as IsPrint20_260_, invoice0_.SalesRep_ID as SalesRe21_260_, invoice0_.DateInvoiced as DateInv22_260_, invoice0_.DatePrinted as DatePri23_260_, invoice0_.DateAcct as DateAcc24_260_, invoice0_.C_BPartner_ID as C_BPart25_260_, invoice0_.C_BPartner_Location_ID as C_BPart26_260_, invoice0_.POReference as PORefer27_260_, invoice0_.IsDiscountPrinted as IsDisco28_260_, invoice0_.DateOrdered as DateOrd29_260_, invoice0_.C_Currency_ID as C_Curre30_260_, invoice0_.C_PaymentTerm_ID as C_Payme31_260_, invoice0_.C_Charge_ID as C_Charg32_260_, invoice0_.ChargeAmt as ChargeA33_260_, invoice0_.TotalLines as TotalLi34_260_, invoice0_.GrandTotal as GrandTo35_260_, invoice0_.M_PriceList_ID as M_Price36_260_, invoice0_.IsTaxIncluded as IsTaxIn37_260_, invoice0_.C_Campaign_ID as C_Campa38_260_, invoice0_.C_Project_ID as C_Proje39_260_, invoice0_.C_Activity_ID as C_Activ40_260_, invoice0_.CreateFrom as CreateF41_260_, invoice0_.GenerateTo as Generat42_260_, invoice0_.AD_User_ID as AD_User43_260_, invoice0_.CopyFrom as CopyFro44_260_, invoice0_.IsSelfService as IsSelfS45_260_, invoice0_.AD_OrgTrx_ID as AD_OrgT46_260_, invoice0_.User1_ID as User47_260_, invoice0_.User2_ID as User48_260_, invoice0_.Withholdingamount as Withhol49_260_, invoice0_.Taxdate as Taxdate50_260_, invoice0_.C_Withholding_ID as C_Withh51_260_, invoice0_.Ispaid as Ispaid52_260_, invoice0_.EM_Einv_Generated as EM_Einv53_260_, invoice0_.Totalpaid as Totalpa54_260_, invoice0_.EM_Einv_Sent as EM_Einv55_260_, invoice0_.OutstandingAmt as Outstan56_260_, invoice0_.DaysTillDue as DaysTil57_260_, invoice0_.DueAmt as DueAmt58_260_, invoice0_.LastCalculatedOnDate as LastCal59_260_, invoice0_.FIN_Paymentmethod_ID as FIN_Pay60_260_, invoice0_.FIN_Payment_Priority_ID as FIN_Pay61_260_, invoice0_.Finalsettlement as Finalse62_260_, invoice0_.Daysoutstanding as Daysout63_260_, invoice0_.Percentageoverdue as Percent64_260_, invoice0_.C_Costcenter_ID as C_Costc65_260_, invoice0_.Calculate_Promotions as Calcula66_260_, invoice0_.A_Asset_ID as A_Asset67_260_, invoice0_.EM_APRM_Addpayment as EM_APRM68_260_, invoice0_.Iscashvat as Iscashv69_260_, invoice0_.EM_APRM_Processinvoice as EM_APRM70_260_, invoice0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm71_260_, invoice0_.Prepaymentamt as Prepaym72_260_, invoice0_.Createfromorders as Createf73_260_, invoice0_.Createfrominouts as Createf74_260_, invoice0_.EM_Advcrm_Newactivity as EM_Advc75_260_, invoice0_.Paidamtatinvoicing as Paidamt76_260_, invoice0_.EM_Obpos_Rounding_Amount as EM_Obpo77_260_, invoice0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc78_260_, invoice0_.BPartner_ExtRef as BPartne79_260_, invoice0_.EM_Aeatsii_Send as EM_Aeat80_260_, invoice0_.EM_Obpos_Sequencename as EM_Obpo81_260_, invoice0_.EM_Aeatsii_Issent as EM_Aeat82_260_, invoice0_.EM_Obpos_Sequencenumber as EM_Obpo83_260_, invoice0_.EM_Aeatsii_Fecha_Operacion as EM_Aeat84_260_, invoice0_.EM_Aeatsii_Clave_Tipo as EM_Aeat85_260_, invoice0_.EM_Aeatsii_Motivo_Rectif as EM_Aeat86_260_, invoice0_.EM_Prouti_Recalculate_Price as EM_Prou87_260_, invoice0_.EM_Aeatsii_Clave_Tipo_Fc as EM_Aeat88_260_, invoice0_.EM_Ml_Select_Product as EM_Ml_S89_260_, invoice0_.EM_Prouti_Pricecalculatetdate as EM_Prou90_260_, invoice0_.EM_Aeatsii_Tipo_Rectif as EM_Aeat91_260_, invoice0_.EM_Prouti_Totalizations as EM_Prou92_260_, invoice0_.EM_Aeatsii_Dua as EM_Aeat93_260_, invoice0_.EM_Aeatsii_Fecha_Dua as EM_Aeat94_260_, invoice0_.EM_Aeatsii_Estado as EM_Aeat95_260_, invoice0_.EM_Aeatsii_Error_Registral as EM_Aeat96_260_, invoice0_.EM_Aeatsii_Modif as EM_Aeat97_260_, invoice0_.EM_Aeatsii_Modified as EM_Aeat98_260_, invoice0_.EM_Aeatsii_Description_ID as EM_Aeat99_260_, invoice0_.EM_Aeatsii_Descripcion_Sii as EM_Aea100_260_, invoice0_.EM_Aeatsii_Fecha_Reg_Cont as EM_Aea101_260_, invoice0_.EM_Aeatsii_Dup as EM_Aea102_260_, invoice0_.EM_Aeatsii_Error_Code as EM_Aea103_260_, invoice0_.EM_Aeatsii_Error_Msg as EM_Aea104_260_, invoice0_.EM_Aeatsii_Unsubscribe as EM_Aea105_260_, invoice0_.EM_Aeatsii_Pur_Description_ID as EM_Aea106_260_, invoice0_.EM_Aeatsii_Multi_Dua as EM_Aea107_260_, invoice0_.EM_Aeatsii_Ejercicio as EM_Aea108_260_, invoice0_.EM_Aeatsii_Periodo as EM_Aea109_260_, invoice0_.EM_Aeatsii_Autofactura as EM_Aea110_260_, invoice0_.EM_Aeatsii_Invoice_ID as EM_Aea111_260_, invoice0_.EM_Aeatsii_Insiidate as EM_Aea112_260_, invoice0_.EM_Aeatsii_Cause_Exemption_ID as EM_Aea113_260_, invoice0_.EM_Aeatsii_Isauthorization as EM_Aea114_260_, invoice0_.EM_Aeatsii_Authorizationno as EM_Aea115_260_, invoice0_.EM_Priuti_Createpurchinv as EM_Pri116_260_, invoice0_.EM_Priuti_Generated as EM_Pri117_260_, invoice0_.EM_Priuti_Date_Complete as EM_Pri118_260_, invoice0_.EM_Prges_Expediente_ID as EM_Prg119_260_, invoice0_.EM_Priuti_User_Complete_ID as EM_Pri120_260_, invoice0_.EM_Prges_Annotation_ID as EM_Prg121_260_, invoice0_.EM_Prges_Record_Number as EM_Prg122_260_, invoice0_.EM_Priuti_Status_Of_Review as EM_Pri123_260_, invoice0_.EM_Prges_Grantotal as EM_Prg124_260_, invoice0_.EM_Priuti_Validate as EM_Pri125_260_, invoice0_.EM_Priuti_Start_Review as EM_Pri126_260_, invoice0_.EM_Prges_Poreference as EM_Prg127_260_, invoice0_.em_cactl_createfromship as em_cac128_260_ from C_Invoice invoice0_ where invoice0_.IsSOTrx=$43 and invoice0_.DocStatus<>$44 and (invoice0_.Updated>$1 or invoice0_.Processed=$45) and (invoice0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (invoice0_.AD_Client_ID in ($40 , $41)) order by invoice0_.GrandTotal desc, invoice0_.C_Invoice_ID desc limit $42
c17924c407select businesspa0_.C_BPartner_ID as C_BPartn1_203_, businesspa0_.AD_Client_ID as AD_Clien2_203_, businesspa0_.AD_Org_ID as AD_Org_I3_203_, businesspa0_.IsActive as IsActive4_203_, businesspa0_.Created as Created5_203_, businesspa0_.CreatedBy as CreatedB6_203_, businesspa0_.Updated as Updated7_203_, businesspa0_.UpdatedBy as UpdatedB8_203_, businesspa0_.Value as Value9_203_, businesspa0_.Name as Name10_203_, businesspa0_.Name2 as Name11_203_, businesspa0_.Description as Descrip12_203_, businesspa0_.IsSummary as IsSumma13_203_, businesspa0_.C_BP_Group_ID as C_BP_Gr14_203_, businesspa0_.IsOneTime as IsOneTi15_203_, businesspa0_.IsProspect as IsProsp16_203_, businesspa0_.IsVendor as IsVendo17_203_, businesspa0_.IsCustomer as IsCusto18_203_, businesspa0_.IsEmployee as IsEmplo19_203_, businesspa0_.IsSalesRep as IsSales20_203_, businesspa0_.ReferenceNo as Referen21_203_, businesspa0_.DUNS as DUNS22_203_, businesspa0_.URL as URL23_203_, businesspa0_.AD_Language as AD_Lang24_203_, businesspa0_.TaxID as TaxID25_203_, businesspa0_.IsTaxExempt as IsTaxEx26_203_, businesspa0_.C_InvoiceSchedule_ID as C_Invoi27_203_, businesspa0_.Rating as Rating28_203_, businesspa0_.SalesVolume as SalesVo29_203_, businesspa0_.NumberEmployees as NumberE30_203_, businesspa0_.NAICS as NAICS31_203_, businesspa0_.FirstSale as FirstSa32_203_, businesspa0_.AcqusitionCost as Acqusit33_203_, businesspa0_.PotentialLifeTimeValue as Potenti34_203_, businesspa0_.ActualLifeTimeValue as ActualL35_203_, businesspa0_.ShareOfCustomer as ShareOf36_203_, businesspa0_.PaymentRule as Payment37_203_, businesspa0_.SO_CreditLimit as SO_Cred38_203_, businesspa0_.SO_CreditUsed as SO_Cred39_203_, businesspa0_.C_PaymentTerm_ID as C_Payme40_203_, businesspa0_.M_PriceList_ID as M_Price41_203_, businesspa0_.IsDiscountPrinted as IsDisco42_203_, businesspa0_.SO_Description as SO_Desc43_203_, businesspa0_.POReference as PORefer44_203_, businesspa0_.PaymentRulePO as Payment45_203_, businesspa0_.PO_PriceList_ID as PO_Pric46_203_, businesspa0_.PO_PaymentTerm_ID as PO_Paym47_203_, businesspa0_.DocumentCopies as Documen48_203_, businesspa0_.C_Greeting_ID as C_Greet49_203_, businesspa0_.InvoiceRule as Invoice50_203_, businesspa0_.DeliveryRule as Deliver51_203_, businesspa0_.DeliveryViaRule as Deliver52_203_, businesspa0_.SalesRep_ID as SalesRe53_203_, businesspa0_.BPartner_Parent_ID as BPartne54_203_, businesspa0_.SOCreditStatus as SOCredi55_203_, businesspa0_.AD_Forced_Org_ID as AD_Forc56_203_, businesspa0_.ShowPriceInOrder as ShowPri57_203_, businesspa0_.Invoicegrouping as Invoice58_203_, businesspa0_.FixMonthDay as FixMont59_203_, businesspa0_.FixMonthDay2 as FixMont60_203_, businesspa0_.Fixmonthday3 as Fixmont61_203_, businesspa0_.Isworker as Isworke62_203_, businesspa0_.UPC as UPC63_203_, businesspa0_.C_Salary_Category_ID as C_Salar64_203_, businesspa0_.Invoice_Printformat as Invoice65_203_, businesspa0_.Last_Days as Last_Da66_203_, businesspa0_.PO_Bankaccount_ID as PO_Bank67_203_, businesspa0_.PO_BP_TaxCategory_ID as PO_BP_T68_203_, businesspa0_.PO_Fixmonthday as PO_Fixm69_203_, businesspa0_.PO_Fixmonthday2 as PO_Fixm70_203_, businesspa0_.PO_Fixmonthday3 as PO_Fixm71_203_, businesspa0_.SO_Bankaccount_ID as SO_Bank72_203_, businesspa0_.SO_Bp_Taxcategory_ID as SO_Bp_T73_203_, businesspa0_.Fiscalcode as Fiscalc74_203_, businesspa0_.Isofiscalcode as Isofisc75_203_, businesspa0_.EM_Einv_Einvoice as EM_Einv76_203_, businesspa0_.PO_C_Incoterms_ID as PO_C_In77_203_, businesspa0_.EM_Einv_Format_Id as EM_Einv78_203_, businesspa0_.SO_C_Incoterms_ID as SO_C_In79_203_, businesspa0_.EM_Einv_Platform_Id as EM_Einv80_203_, businesspa0_.FIN_Paymentmethod_ID as FIN_Pay81_203_, businesspa0_.EM_Einv_Email as EM_Einv82_203_, businesspa0_.PO_Paymentmethod_ID as PO_Paym83_203_, businesspa0_.FIN_Financial_Account_ID as FIN_Fin84_203_, businesspa0_.EM_Einv_Deliverymode as EM_Einv85_203_, businesspa0_.PO_Financial_Account_ID as PO_Fina86_203_, businesspa0_.Customer_Blocking as Custome87_203_, businesspa0_.Vendor_Blocking as Vendor_88_203_, businesspa0_.SO_Payment_Blocking as SO_Paym89_203_, businesspa0_.PO_Payment_Blocking as PO_Paym90_203_, businesspa0_.SO_Invoice_Blocking as SO_Invo91_203_, businesspa0_.PO_Invoice_Blocking as PO_Invo92_203_, businesspa0_.SO_Order_Blocking as SO_Orde93_203_, businesspa0_.PO_Order_Blocking as PO_Orde94_203_, businesspa0_.SO_Goods_Blocking as SO_Good95_203_, businesspa0_.PO_Goods_Blocking as PO_Good96_203_, businesspa0_.Iscashvat as Iscashv97_203_, businesspa0_.EM_Advcrm_Newactivity as EM_Advc98_203_, businesspa0_.Update_Currency as Update_99_203_, businesspa0_.BP_Currency_ID as BP_Cur100_203_, businesspa0_.Birthplace as Birthp101_203_, businesspa0_.Birthday as Birthd102_203_, businesspa0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_203_, businesspa0_.Is_Customer_Consent as Is_Cus104_203_, businesspa0_.EM_OBSMAIL_INVOICEVIAEMAIL as EM_OBS105_203_, businesspa0_.EM_Obsepad_Mandate_Identifier as EM_Obs106_203_, businesspa0_.EM_Obsmail_Language as EM_Obs107_203_, businesspa0_.EM_Obsepad_Mandate_Date as EM_Obs108_203_, businesspa0_.EM_Aeatsii_Rep_Taxid as EM_Aea109_203_, businesspa0_.EM_Aeatsii_Menor as EM_Aea110_203_, businesspa0_.EM_Pricm_Isintercompany as EM_Pri111_203_, businesspa0_.EM_Psat_Billtobpartner_ID as EM_Psa112_203_, businesspa0_.EM_Psat_Locator_ID as EM_Psa113_203_, businesspa0_.EM_Psat_Mobile_Request as EM_Psa114_203_, businesspa0_.EM_Prges_Glitem_ID as EM_Prg115_203_, businesspa0_.EM_Rrhh_Exemployee as EM_Rrh116_203_, businesspa0_.EM_Rrhh_Candidate as EM_Rrh117_203_, businesspa0_.EM_Prpass_No_Print_Pass as EM_Prp118_203_, businesspa0_.EM_Rrhh_Holidays_Supervisor as EM_Rrh119_203_, businesspa0_.EM_Cactal_Emp_No as EM_Cac120_203_, businesspa0_.EM_Cactal_Emp_Relationship_No as EM_Cac121_203_, businesspa0_.EM_Obwpl_Bp_Block_Pickinglist as EM_Obw122_203_, businesspa0_.EM_Pruti_Addbp as EM_Pru123_203_, businesspa0_.EM_Prpass_Generatepassemployee as EM_Prp124_203_, businesspa0_.EM_Rrhh_Mainworkstation_ID as EM_Rrh125_203_, businesspa0_.EM_Rrhh_Bp_Transfer_Code as EM_Rrh126_203_, businesspa0_.EM_OBTIK_Tax_ID_Key as EM_OBT127_203_ from C_BPartner businesspa0_ where (upper((businesspa0_.Value||$3||businesspa0_.Name||$4||coalesce(to_char(businesspa0_.TaxID), $5)||$6||coalesce(to_char(businesspa0_.Name2), $7))) like upper($1) escape $8) and (exists (select $9 from C_Invoice invoice1_ inner join C_BPartner businesspa2_ on invoice1_.C_BPartner_ID=businesspa2_.C_BPartner_ID where invoice1_.IsSOTrx=$10 and invoice1_.DocStatus<>$11 and businesspa2_.C_BPartner_ID=businesspa0_.C_BPartner_ID and (invoice1_.AD_Org_ID in ($12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41 , $42 , $43 , $44 , $45 , $46 , $47 , $48 , $49)) and (invoice1_.AD_Client_ID in ($50 , $51)))) order by businesspa0_.Value, businesspa0_.Name, businesspa0_.TaxID, businesspa0_.Name2 limit $2
43a80059e4SELECT * FROM C_Invoice_Create($8, v_Record_ID)
22615c404bselect invoice0_.C_Invoice_ID as C_Invoic1_260_, invoice0_.AD_Client_ID as AD_Clien2_260_, invoice0_.AD_Org_ID as AD_Org_I3_260_, invoice0_.IsActive as IsActive4_260_, invoice0_.Created as Created5_260_, invoice0_.CreatedBy as CreatedB6_260_, invoice0_.Updated as Updated7_260_, invoice0_.UpdatedBy as UpdatedB8_260_, invoice0_.IsSOTrx as IsSOTrx9_260_, invoice0_.DocumentNo as Documen10_260_, invoice0_.DocStatus as DocStat11_260_, invoice0_.DocAction as DocActi12_260_, invoice0_.Processing as Process13_260_, invoice0_.Processed as Process14_260_, invoice0_.Posted as Posted15_260_, invoice0_.C_DocType_ID as C_DocTy16_260_, invoice0_.C_DocTypeTarget_ID as C_DocTy17_260_, invoice0_.C_Order_ID as C_Order18_260_, invoice0_.Description as Descrip19_260_, invoice0_.IsPrinted as IsPrint20_260_, invoice0_.SalesRep_ID as SalesRe21_260_, invoice0_.DateInvoiced as DateInv22_260_, invoice0_.DatePrinted as DatePri23_260_, invoice0_.DateAcct as DateAcc24_260_, invoice0_.C_BPartner_ID as C_BPart25_260_, invoice0_.C_BPartner_Location_ID as C_BPart26_260_, invoice0_.POReference as PORefer27_260_, invoice0_.IsDiscountPrinted as IsDisco28_260_, invoice0_.DateOrdered as DateOrd29_260_, invoice0_.C_Currency_ID as C_Curre30_260_, invoice0_.C_PaymentTerm_ID as C_Payme31_260_, invoice0_.C_Charge_ID as C_Charg32_260_, invoice0_.ChargeAmt as ChargeA33_260_, invoice0_.TotalLines as TotalLi34_260_, invoice0_.GrandTotal as GrandTo35_260_, invoice0_.M_PriceList_ID as M_Price36_260_, invoice0_.IsTaxIncluded as IsTaxIn37_260_, invoice0_.C_Campaign_ID as C_Campa38_260_, invoice0_.C_Project_ID as C_Proje39_260_, invoice0_.C_Activity_ID as C_Activ40_260_, invoice0_.CreateFrom as CreateF41_260_, invoice0_.GenerateTo as Generat42_260_, invoice0_.AD_User_ID as AD_User43_260_, invoice0_.CopyFrom as CopyFro44_260_, invoice0_.IsSelfService as IsSelfS45_260_, invoice0_.AD_OrgTrx_ID as AD_OrgT46_260_, invoice0_.User1_ID as User47_260_, invoice0_.User2_ID as User48_260_, invoice0_.Withholdingamount as Withhol49_260_, invoice0_.Taxdate as Taxdate50_260_, invoice0_.C_Withholding_ID as C_Withh51_260_, invoice0_.Ispaid as Ispaid52_260_, invoice0_.EM_Einv_Generated as EM_Einv53_260_, invoice0_.Totalpaid as Totalpa54_260_, invoice0_.EM_Einv_Sent as EM_Einv55_260_, invoice0_.OutstandingAmt as Outstan56_260_, invoice0_.DaysTillDue as DaysTil57_260_, invoice0_.DueAmt as DueAmt58_260_, invoice0_.LastCalculatedOnDate as LastCal59_260_, invoice0_.FIN_Paymentmethod_ID as FIN_Pay60_260_, invoice0_.FIN_Payment_Priority_ID as FIN_Pay61_260_, invoice0_.Finalsettlement as Finalse62_260_, invoice0_.Daysoutstanding as Daysout63_260_, invoice0_.Percentageoverdue as Percent64_260_, invoice0_.C_Costcenter_ID as C_Costc65_260_, invoice0_.Calculate_Promotions as Calcula66_260_, invoice0_.A_Asset_ID as A_Asset67_260_, invoice0_.EM_APRM_Addpayment as EM_APRM68_260_, invoice0_.Iscashvat as Iscashv69_260_, invoice0_.EM_APRM_Processinvoice as EM_APRM70_260_, invoice0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm71_260_, invoice0_.Prepaymentamt as Prepaym72_260_, invoice0_.Createfromorders as Createf73_260_, invoice0_.Createfrominouts as Createf74_260_, invoice0_.EM_Advcrm_Newactivity as EM_Advc75_260_, invoice0_.Paidamtatinvoicing as Paidamt76_260_, invoice0_.EM_Obpos_Rounding_Amount as EM_Obpo77_260_, invoice0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc78_260_, invoice0_.BPartner_ExtRef as BPartne79_260_, invoice0_.EM_Aeatsii_Send as EM_Aeat80_260_, invoice0_.EM_Obpos_Sequencename as EM_Obpo81_260_, invoice0_.EM_Aeatsii_Issent as EM_Aeat82_260_, invoice0_.EM_Obpos_Sequencenumber as EM_Obpo83_260_, invoice0_.EM_Aeatsii_Fecha_Operacion as EM_Aeat84_260_, invoice0_.EM_Aeatsii_Clave_Tipo as EM_Aeat85_260_, invoice0_.EM_Aeatsii_Motivo_Rectif as EM_Aeat86_260_, invoice0_.EM_Prouti_Recalculate_Price as EM_Prou87_260_, invoice0_.EM_Aeatsii_Clave_Tipo_Fc as EM_Aeat88_260_, invoice0_.EM_Ml_Select_Product as EM_Ml_S89_260_, invoice0_.EM_Prouti_Pricecalculatetdate as EM_Prou90_260_, invoice0_.EM_Aeatsii_Tipo_Rectif as EM_Aeat91_260_, invoice0_.EM_Prouti_Totalizations as EM_Prou92_260_, invoice0_.EM_Aeatsii_Dua as EM_Aeat93_260_, invoice0_.EM_Aeatsii_Fecha_Dua as EM_Aeat94_260_, invoice0_.EM_Aeatsii_Estado as EM_Aeat95_260_, invoice0_.EM_Aeatsii_Error_Registral as EM_Aeat96_260_, invoice0_.EM_Aeatsii_Modif as EM_Aeat97_260_, invoice0_.EM_Aeatsii_Modified as EM_Aeat98_260_, invoice0_.EM_Aeatsii_Description_ID as EM_Aeat99_260_, invoice0_.EM_Aeatsii_Descripcion_Sii as EM_Aea100_260_, invoice0_.EM_Aeatsii_Fecha_Reg_Cont as EM_Aea101_260_, invoice0_.EM_Aeatsii_Dup as EM_Aea102_260_, invoice0_.EM_Aeatsii_Error_Code as EM_Aea103_260_, invoice0_.EM_Aeatsii_Error_Msg as EM_Aea104_260_, invoice0_.EM_Aeatsii_Unsubscribe as EM_Aea105_260_, invoice0_.EM_Aeatsii_Pur_Description_ID as EM_Aea106_260_, invoice0_.EM_Aeatsii_Multi_Dua as EM_Aea107_260_, invoice0_.EM_Aeatsii_Ejercicio as EM_Aea108_260_, invoice0_.EM_Aeatsii_Periodo as EM_Aea109_260_, invoice0_.EM_Aeatsii_Autofactura as EM_Aea110_260_, invoice0_.EM_Aeatsii_Invoice_ID as EM_Aea111_260_, invoice0_.EM_Aeatsii_Insiidate as EM_Aea112_260_, invoice0_.EM_Aeatsii_Cause_Exemption_ID as EM_Aea113_260_, invoice0_.EM_Aeatsii_Isauthorization as EM_Aea114_260_, invoice0_.EM_Aeatsii_Authorizationno as EM_Aea115_260_, invoice0_.EM_Priuti_Createpurchinv as EM_Pri116_260_, invoice0_.EM_Priuti_Generated as EM_Pri117_260_, invoice0_.EM_Priuti_Date_Complete as EM_Pri118_260_, invoice0_.EM_Prges_Expediente_ID as EM_Prg119_260_, invoice0_.EM_Priuti_User_Complete_ID as EM_Pri120_260_, invoice0_.EM_Prges_Annotation_ID as EM_Prg121_260_, invoice0_.EM_Prges_Record_Number as EM_Prg122_260_, invoice0_.EM_Priuti_Status_Of_Review as EM_Pri123_260_, invoice0_.EM_Prges_Grantotal as EM_Prg124_260_, invoice0_.EM_Priuti_Validate as EM_Pri125_260_, invoice0_.EM_Priuti_Start_Review as EM_Pri126_260_, invoice0_.EM_Prges_Poreference as EM_Prg127_260_, invoice0_.em_cactl_createfromship as em_cac128_260_ from C_Invoice invoice0_ left outer join FIN_Payment_Schedule finpayment1_ on invoice0_.C_Invoice_ID=finpayment1_.C_Invoice_ID where invoice0_.Processed='Y' and (invoice0_.Ispaid='N' or finpayment1_.Updated>=invoice0_.LastCalculatedOnDate or invoice0_.OutstandingAmt<>0 or invoice0_.Finalsettlement is null) and invoice0_.IsActive='Y'
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
d817a62e25select 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, order0_.C_Order_ID 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
3aafe57489select order0_.C_Order_ID as C_Order_1_276_, order0_.AD_Client_ID as AD_Clien2_276_, order0_.AD_Org_ID as AD_Org_I3_276_, order0_.IsActive as IsActive4_276_, order0_.Created as Created5_276_, order0_.CreatedBy as CreatedB6_276_, order0_.Updated as Updated7_276_, order0_.UpdatedBy as UpdatedB8_276_, order0_.IsSOTrx as IsSOTrx9_276_, order0_.DocumentNo as Documen10_276_, order0_.DocStatus as DocStat11_276_, order0_.DocAction as DocActi12_276_, order0_.Processing as Process13_276_, order0_.Processed as Process14_276_, order0_.C_DocType_ID as C_DocTy15_276_, order0_.C_DocTypeTarget_ID as C_DocTy16_276_, order0_.Description as Descrip17_276_, order0_.IsDelivered as IsDeliv18_276_, order0_.IsInvoiced as IsInvoi19_276_, order0_.IsPrinted as IsPrint20_276_, order0_.IsSelected as IsSelec21_276_, order0_.SalesRep_ID as SalesRe22_276_, order0_.DateOrdered as DateOrd23_276_, order0_.DatePromised as DatePro24_276_, order0_.DatePrinted as DatePri25_276_, order0_.DateAcct as DateAcc26_276_, order0_.C_BPartner_ID as C_BPart27_276_, order0_.BillTo_ID as BillTo_28_276_, order0_.C_BPartner_Location_ID as C_BPart29_276_, order0_.POReference as PORefer30_276_, order0_.IsDiscountPrinted as IsDisco31_276_, order0_.C_Currency_ID as C_Curre32_276_, order0_.PaymentRule as Payment33_276_, order0_.C_PaymentTerm_ID as C_Payme34_276_, order0_.InvoiceRule as Invoice35_276_, order0_.DeliveryRule as Deliver36_276_, order0_.FreightCostRule as Freight37_276_, order0_.FreightAmt as Freight38_276_, order0_.DeliveryViaRule as Deliver39_276_, order0_.M_Shipper_ID as M_Shipp40_276_, order0_.C_Charge_ID as C_Charg41_276_, order0_.ChargeAmt as ChargeA42_276_, order0_.PriorityRule as Priorit43_276_, order0_.TotalLines as TotalLi44_276_, order0_.GrandTotal as GrandTo45_276_, order0_.M_Warehouse_ID as M_Wareh46_276_, order0_.M_PriceList_ID as M_Price47_276_, order0_.IsTaxIncluded as IsTaxIn48_276_, order0_.C_Campaign_ID as C_Campa49_276_, order0_.C_Project_ID as C_Proje50_276_, order0_.C_Activity_ID as C_Activ51_276_, order0_.Posted as Posted52_276_, order0_.AD_User_ID as AD_User53_276_, order0_.CopyFrom as CopyFro54_276_, order0_.DropShip_BPartner_ID as DropShi55_276_, order0_.DropShip_Location_ID as DropShi56_276_, order0_.DropShip_User_ID as DropShi57_276_, order0_.IsSelfService as IsSelfS58_276_, order0_.AD_OrgTrx_ID as AD_OrgT59_276_, order0_.User1_ID as User60_276_, order0_.User2_ID as User61_276_, order0_.Deliverynotes as Deliver62_276_, order0_.C_Incoterms_ID as C_Incot63_276_, order0_.Incotermsdescription as Incoter64_276_, order0_.Generatetemplate as Generat65_276_, order0_.Delivery_Location_ID as Deliver66_276_, order0_.CopyFromPO as CopyFro67_276_, order0_.FIN_Paymentmethod_ID as FIN_Pay68_276_, order0_.FIN_Payment_Priority_ID as FIN_Pay69_276_, order0_.RM_PickFromShipment as RM_Pick70_276_, order0_.RM_ReceiveMaterials as RM_Rece71_276_, order0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm72_276_, order0_.RM_CreateInvoice as RM_Crea73_276_, order0_.C_Return_Reason_ID as C_Retur74_276_, order0_.RM_AddOrphanLine as RM_AddO75_276_, order0_.A_Asset_ID as A_Asset76_276_, order0_.Calculate_Promotions as Calcula77_276_, order0_.C_Costcenter_ID as C_Costc78_276_, order0_.Convertquotation as Convert79_276_, order0_.C_Reject_Reason_ID as C_Rejec80_276_, order0_.validuntil as validun81_276_, order0_.Quotation_ID as Quotati82_276_, order0_.SO_Res_Status as SO_Res_83_276_, order0_.Create_POLines as Create_84_276_, order0_.EM_Obdisc_Addpack as EM_Obdi85_276_, order0_.Iscashvat as Iscashv86_276_, order0_.EM_OBMFM_Selectfreight as EM_OBMF87_276_, order0_.EM_OBMFM_Delivery_Period_ID as EM_OBMF88_276_, order0_.RM_Pickfromreceipt as RM_Pick89_276_, order0_.Cancelandreplace as Cancela90_276_, order0_.EM_Advcrm_Newactivity as EM_Advc91_276_, order0_.EM_APRM_AddPayment as EM_APRM92_276_, order0_.EM_OBMFM_Delivery_Charges as EM_OBMF93_276_, order0_.EM_OBMFM_Freight_ID as EM_OBMF94_276_, order0_.EM_Obwpl_Generatepicking as EM_Obwp95_276_, order0_.EM_Advcrm_Opportunity_ID as EM_Advc96_276_, order0_.EM_OBMFM_Weight as EM_OBMF97_276_, order0_.EM_Obwpl_Isinpickinglist as EM_Obwp98_276_, order0_.EM_Rcinv_Contractdate as EM_Rcin99_276_, order0_.EM_Obwpl_Readypl as EM_Obw100_276_, order0_.EM_Rcinv_Initialdate as EM_Rci101_276_, order0_.EM_Rcinv_Enddate as EM_Rci102_276_, order0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_276_, order0_.EM_OBMFM_Weight_Uom_ID as EM_OBM104_276_, order0_.EM_Rcinv_Frequency as EM_Rci105_276_, order0_.EM_OBMFM_Set_Weight as EM_OBM106_276_, order0_.EM_Rcinv_Renewautomatically as EM_Rci107_276_, order0_.EM_Aeatsii_Fecha_Operacion as EM_Aea108_276_, order0_.EM_Ml_Select_Product as EM_Ml_109_276_, order0_.EM_Rcinv_Renovationtimes as EM_Rci110_276_, order0_.Confirmcancelandreplace as Confir111_276_, order0_.EM_Aeatsii_Descripcion_Sii as EM_Aea112_276_, order0_.EM_Obpos_Applications_ID as EM_Obp113_276_, order0_.EM_Rcinv_Freqrenovationtime as EM_Rci114_276_, order0_.EM_Obpos_Sendemail as EM_Obp115_276_, order0_.EM_Rcinv_Ordercontract_ID as EM_Rci116_276_, order0_.EM_Obpos_Email_Status as EM_Obp117_276_, order0_.EM_Rcinv_Freqtime as EM_Rci118_276_, order0_.Cancelledorder_id as Cancel119_276_, order0_.EM_Obpos_App_Cashup_ID as EM_Obp120_276_, order0_.EM_Obpos_Createdabsolute as EM_Obp121_276_, order0_.Replacedorder_id as Replac122_276_, order0_.EM_OBPOS_NotInvoiceOnCashUp as EM_OBP123_276_, order0_.EM_Obpos_Rejected_Quotat_ID as EM_Obp124_276_, order0_.EM_Obpos_Isdeleted as EM_Obp125_276_, order0_.Iscancelled as Iscanc126_276_, order0_.EM_Obpos_Islayaway as EM_Obp127_276_, order0_.EM_Obpos_Prepaymentamt as EM_Obp128_276_, order0_.Replacementorder_ID as Replac129_276_, order0_.EM_Obpos_Prepaymentlimitamt as EM_Obp130_276_, order0_.EM_Obpos_Prepaymentlaylimitamt as EM_Obp131_276_, order0_.EM_Obpos_Rounding_Amount as EM_Obp132_276_, order0_.BPartner_ExtRef as BPartn133_276_, order0_.EM_Obpos_Sequencename as EM_Obp134_276_, order0_.EM_Prqc_Clauses_Selector as EM_Prq135_276_, order0_.EM_Obpos_Sequencenumber as EM_Obp136_276_, order0_.EM_Rcinv_Cancelcontract as EM_Rci137_276_, order0_.EM_Rcinv_Cancelleddate as EM_Rci138_276_, order0_.EM_Rcinv_Iscancelled as EM_Rci139_276_, order0_.EM_Psat_Activity_ID as EM_Psa140_276_, order0_.EM_OBSMAIL_EmailAddress as EM_OBS141_276_, order0_.EM_Prouti_Order_Stock as EM_Pro142_276_, order0_.EM_Prouti_Pregenerate_Minout as EM_Pro143_276_, order0_.EM_Prouti_Sotopo as EM_Pro144_276_, order0_.EM_Prouti_Generate_Pick_Inv as EM_Pro145_276_, order0_.EM_Pricm_Order_ID as EM_Pri146_276_, order0_.EM_Prouti_Order_ID as EM_Pro147_276_, order0_.EM_Prouti_Grandtotalinitial as EM_Pro148_276_, order0_.EM_Prouti_Dateclosed as EM_Pro149_276_, order0_.EM_Prouti_Totallinesinitial as EM_Pro150_276_, order0_.EM_Prouti_Changebpartner as EM_Pro151_276_, order0_.EM_Prouti_Recalculate_Price as EM_Pro152_276_, order0_.em_prqr_execute as em_prq153_276_, order0_.EM_Prouti_Pricecalculatetdate as EM_Pro154_276_, order0_.EM_Prqr_Execute_Purchase as EM_Prq155_276_, order0_.EM_Prouti_Reactiveorder as EM_Pro156_276_, order0_.EM_Prqr_Return_Select_Prod as EM_Prq157_276_, order0_.EM_Prouti_Totalizations as EM_Pro158_276_, order0_.em_prouti_Invoiced as em_pro159_276_, order0_.em_prouti_Received as em_pro160_276_, order0_.em_prouti_initial_received as em_pro161_276_, order0_.EM_Prouti_Status_Of_Review as EM_Pro162_276_, order0_.EM_Prouti_Validate_Order as EM_Pro163_276_, order0_.EM_Prouti_Start_Review as EM_Pro164_276_, order0_.EM_Ml_Select_Product_Byattrib as EM_Ml_165_276_, order0_.EM_Prres_Reservation_ID as EM_Prr166_276_, order0_.EM_Prres_Responsible_ID as EM_Prr167_276_, order0_.EM_Prres_Diners as EM_Prr168_276_, order0_.EM_Prres_Sended as EM_Prr169_276_, order0_.EM_Prres_Printed as EM_Prr170_276_, order0_.EM_Prouti_Initial_Bp_ID as EM_Pro171_276_, order0_.EM_Prouti_Addlines_Btn as EM_Pro172_276_, order0_.EM_Prtoma_Tomaticket_ID as EM_Prt173_276_, order0_.EM_Cactl_IsCopy as EM_Cac174_276_, order0_.EM_Prtoma_Jsonorder as EM_Prt175_276_, order0_.EM_Prres_Paid_On_Credit as EM_Prr176_276_, order0_.EM_Prtoma_Grossamount as EM_Prt177_276_, order0_.EM_Cactl_Internal_Notes_Group as EM_Cac178_276_, order0_.EM_Prouti_Changebpartner_Bgt as EM_Pro179_276_, order0_.EM_Prrgr_Locator_ID as EM_Prr180_276_, order0_.EM_Paytef_Transactionreference as EM_Pay181_276_, order0_.EM_Cactl_Indirect_Cost_ID as EM_Cac182_276_, order0_.EM_Cactl_Calculate_Cost as EM_Cac183_276_, order0_.EM_Cactl_Totalcost as EM_Cac184_276_, order0_.EM_Cactl_Forceselectedproject as EM_Cac185_276_, order0_.EM_Cactl_Verified_Return as EM_Cac186_276_, order0_.EM_Cactl_Duplicate_Budget as EM_Cac187_276_, order0_.EM_Prres_Orig_Order_ID as EM_Prr188_276_, order0_.EM_Prcpr_Is_Cloned as EM_Prc189_276_, order0_.EM_Prouti_Select_Soline as EM_Pro190_276_, order0_.EM_Prouti_Return_Quantity as EM_Pro191_276_, order0_.EM_Prqr_Executecredit as EM_Prq192_276_, order0_.Em_Prqr_Credit_Purchase_ID as Em_Prq193_276_ from C_Order order0_ cross join C_DocType documentty1_ where order0_.C_DocTypeTarget_ID=documentty1_.C_DocType_ID and order0_.IsSOTrx=$43 and documentty1_.IsReturn=$44 and (order0_.Updated>$1 or order0_.Processed=$45) and (order0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (order0_.AD_Client_ID in ($40 , $41)) order by order0_.DatePromised desc, order0_.C_Order_ID desc limit $42
ec8c626e99COPY public.ad_image (ad_image_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, name, imageurl, binarydata, width, height, mimetype) TO stdout
34b8ae3227select order0_.C_Order_ID as C_Order_1_276_, order0_.AD_Client_ID as AD_Clien2_276_, order0_.AD_Org_ID as AD_Org_I3_276_, order0_.IsActive as IsActive4_276_, order0_.Created as Created5_276_, order0_.CreatedBy as CreatedB6_276_, order0_.Updated as Updated7_276_, order0_.UpdatedBy as UpdatedB8_276_, order0_.IsSOTrx as IsSOTrx9_276_, order0_.DocumentNo as Documen10_276_, order0_.DocStatus as DocStat11_276_, order0_.DocAction as DocActi12_276_, order0_.Processing as Process13_276_, order0_.Processed as Process14_276_, order0_.C_DocType_ID as C_DocTy15_276_, order0_.C_DocTypeTarget_ID as C_DocTy16_276_, order0_.Description as Descrip17_276_, order0_.IsDelivered as IsDeliv18_276_, order0_.IsInvoiced as IsInvoi19_276_, order0_.IsPrinted as IsPrint20_276_, order0_.IsSelected as IsSelec21_276_, order0_.SalesRep_ID as SalesRe22_276_, order0_.DateOrdered as DateOrd23_276_, order0_.DatePromised as DatePro24_276_, order0_.DatePrinted as DatePri25_276_, order0_.DateAcct as DateAcc26_276_, order0_.C_BPartner_ID as C_BPart27_276_, order0_.BillTo_ID as BillTo_28_276_, order0_.C_BPartner_Location_ID as C_BPart29_276_, order0_.POReference as PORefer30_276_, order0_.IsDiscountPrinted as IsDisco31_276_, order0_.C_Currency_ID as C_Curre32_276_, order0_.PaymentRule as Payment33_276_, order0_.C_PaymentTerm_ID as C_Payme34_276_, order0_.InvoiceRule as Invoice35_276_, order0_.DeliveryRule as Deliver36_276_, order0_.FreightCostRule as Freight37_276_, order0_.FreightAmt as Freight38_276_, order0_.DeliveryViaRule as Deliver39_276_, order0_.M_Shipper_ID as M_Shipp40_276_, order0_.C_Charge_ID as C_Charg41_276_, order0_.ChargeAmt as ChargeA42_276_, order0_.PriorityRule as Priorit43_276_, order0_.TotalLines as TotalLi44_276_, order0_.GrandTotal as GrandTo45_276_, order0_.M_Warehouse_ID as M_Wareh46_276_, order0_.M_PriceList_ID as M_Price47_276_, order0_.IsTaxIncluded as IsTaxIn48_276_, order0_.C_Campaign_ID as C_Campa49_276_, order0_.C_Project_ID as C_Proje50_276_, order0_.C_Activity_ID as C_Activ51_276_, order0_.Posted as Posted52_276_, order0_.AD_User_ID as AD_User53_276_, order0_.CopyFrom as CopyFro54_276_, order0_.DropShip_BPartner_ID as DropShi55_276_, order0_.DropShip_Location_ID as DropShi56_276_, order0_.DropShip_User_ID as DropShi57_276_, order0_.IsSelfService as IsSelfS58_276_, order0_.AD_OrgTrx_ID as AD_OrgT59_276_, order0_.User1_ID as User60_276_, order0_.User2_ID as User61_276_, order0_.Deliverynotes as Deliver62_276_, order0_.C_Incoterms_ID as C_Incot63_276_, order0_.Incotermsdescription as Incoter64_276_, order0_.Generatetemplate as Generat65_276_, order0_.Delivery_Location_ID as Deliver66_276_, order0_.CopyFromPO as CopyFro67_276_, order0_.FIN_Paymentmethod_ID as FIN_Pay68_276_, order0_.FIN_Payment_Priority_ID as FIN_Pay69_276_, order0_.RM_PickFromShipment as RM_Pick70_276_, order0_.RM_ReceiveMaterials as RM_Rece71_276_, order0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm72_276_, order0_.RM_CreateInvoice as RM_Crea73_276_, order0_.C_Return_Reason_ID as C_Retur74_276_, order0_.RM_AddOrphanLine as RM_AddO75_276_, order0_.A_Asset_ID as A_Asset76_276_, order0_.Calculate_Promotions as Calcula77_276_, order0_.C_Costcenter_ID as C_Costc78_276_, order0_.Convertquotation as Convert79_276_, order0_.C_Reject_Reason_ID as C_Rejec80_276_, order0_.validuntil as validun81_276_, order0_.Quotation_ID as Quotati82_276_, order0_.SO_Res_Status as SO_Res_83_276_, order0_.Create_POLines as Create_84_276_, order0_.EM_Obdisc_Addpack as EM_Obdi85_276_, order0_.Iscashvat as Iscashv86_276_, order0_.EM_OBMFM_Selectfreight as EM_OBMF87_276_, order0_.EM_OBMFM_Delivery_Period_ID as EM_OBMF88_276_, order0_.RM_Pickfromreceipt as RM_Pick89_276_, order0_.Cancelandreplace as Cancela90_276_, order0_.EM_Advcrm_Newactivity as EM_Advc91_276_, order0_.EM_APRM_AddPayment as EM_APRM92_276_, order0_.EM_OBMFM_Delivery_Charges as EM_OBMF93_276_, order0_.EM_OBMFM_Freight_ID as EM_OBMF94_276_, order0_.EM_Obwpl_Generatepicking as EM_Obwp95_276_, order0_.EM_Advcrm_Opportunity_ID as EM_Advc96_276_, order0_.EM_OBMFM_Weight as EM_OBMF97_276_, order0_.EM_Obwpl_Isinpickinglist as EM_Obwp98_276_, order0_.EM_Rcinv_Contractdate as EM_Rcin99_276_, order0_.EM_Obwpl_Readypl as EM_Obw100_276_, order0_.EM_Rcinv_Initialdate as EM_Rci101_276_, order0_.EM_Rcinv_Enddate as EM_Rci102_276_, order0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgp103_276_, order0_.EM_OBMFM_Weight_Uom_ID as EM_OBM104_276_, order0_.EM_Rcinv_Frequency as EM_Rci105_276_, order0_.EM_OBMFM_Set_Weight as EM_OBM106_276_, order0_.EM_Rcinv_Renewautomatically as EM_Rci107_276_, order0_.EM_Aeatsii_Fecha_Operacion as EM_Aea108_276_, order0_.EM_Ml_Select_Product as EM_Ml_109_276_, order0_.EM_Rcinv_Renovationtimes as EM_Rci110_276_, order0_.Confirmcancelandreplace as Confir111_276_, order0_.EM_Aeatsii_Descripcion_Sii as EM_Aea112_276_, order0_.EM_Obpos_Applications_ID as EM_Obp113_276_, order0_.EM_Rcinv_Freqrenovationtime as EM_Rci114_276_, order0_.EM_Obpos_Sendemail as EM_Obp115_276_, order0_.EM_Rcinv_Ordercontract_ID as EM_Rci116_276_, order0_.EM_Obpos_Email_Status as EM_Obp117_276_, order0_.EM_Rcinv_Freqtime as EM_Rci118_276_, order0_.Cancelledorder_id as Cancel119_276_, order0_.EM_Obpos_App_Cashup_ID as EM_Obp120_276_, order0_.EM_Obpos_Createdabsolute as EM_Obp121_276_, order0_.Replacedorder_id as Replac122_276_, order0_.EM_OBPOS_NotInvoiceOnCashUp as EM_OBP123_276_, order0_.EM_Obpos_Rejected_Quotat_ID as EM_Obp124_276_, order0_.EM_Obpos_Isdeleted as EM_Obp125_276_, order0_.Iscancelled as Iscanc126_276_, order0_.EM_Obpos_Islayaway as EM_Obp127_276_, order0_.EM_Obpos_Prepaymentamt as EM_Obp128_276_, order0_.Replacementorder_ID as Replac129_276_, order0_.EM_Obpos_Prepaymentlimitamt as EM_Obp130_276_, order0_.EM_Obpos_Prepaymentlaylimitamt as EM_Obp131_276_, order0_.EM_Obpos_Rounding_Amount as EM_Obp132_276_, order0_.BPartner_ExtRef as BPartn133_276_, order0_.EM_Obpos_Sequencename as EM_Obp134_276_, order0_.EM_Prqc_Clauses_Selector as EM_Prq135_276_, order0_.EM_Obpos_Sequencenumber as EM_Obp136_276_, order0_.EM_Rcinv_Cancelcontract as EM_Rci137_276_, order0_.EM_Rcinv_Cancelleddate as EM_Rci138_276_, order0_.EM_Rcinv_Iscancelled as EM_Rci139_276_, order0_.EM_Psat_Activity_ID as EM_Psa140_276_, order0_.EM_OBSMAIL_EmailAddress as EM_OBS141_276_, order0_.EM_Prouti_Order_Stock as EM_Pro142_276_, order0_.EM_Prouti_Pregenerate_Minout as EM_Pro143_276_, order0_.EM_Prouti_Sotopo as EM_Pro144_276_, order0_.EM_Prouti_Generate_Pick_Inv as EM_Pro145_276_, order0_.EM_Pricm_Order_ID as EM_Pri146_276_, order0_.EM_Prouti_Order_ID as EM_Pro147_276_, order0_.EM_Prouti_Grandtotalinitial as EM_Pro148_276_, order0_.EM_Prouti_Dateclosed as EM_Pro149_276_, order0_.EM_Prouti_Totallinesinitial as EM_Pro150_276_, order0_.EM_Prouti_Changebpartner as EM_Pro151_276_, order0_.EM_Prouti_Recalculate_Price as EM_Pro152_276_, order0_.em_prqr_execute as em_prq153_276_, order0_.EM_Prouti_Pricecalculatetdate as EM_Pro154_276_, order0_.EM_Prqr_Execute_Purchase as EM_Prq155_276_, order0_.EM_Prouti_Reactiveorder as EM_Pro156_276_, order0_.EM_Prqr_Return_Select_Prod as EM_Prq157_276_, order0_.EM_Prouti_Totalizations as EM_Pro158_276_, order0_.em_prouti_Invoiced as em_pro159_276_, order0_.em_prouti_Received as em_pro160_276_, order0_.em_prouti_initial_received as em_pro161_276_, order0_.EM_Prouti_Status_Of_Review as EM_Pro162_276_, order0_.EM_Prouti_Validate_Order as EM_Pro163_276_, order0_.EM_Prouti_Start_Review as EM_Pro164_276_, order0_.EM_Ml_Select_Product_Byattrib as EM_Ml_165_276_, order0_.EM_Prres_Reservation_ID as EM_Prr166_276_, order0_.EM_Prres_Responsible_ID as EM_Prr167_276_, order0_.EM_Prres_Diners as EM_Prr168_276_, order0_.EM_Prres_Sended as EM_Prr169_276_, order0_.EM_Prres_Printed as EM_Prr170_276_, order0_.EM_Prouti_Initial_Bp_ID as EM_Pro171_276_, order0_.EM_Prouti_Addlines_Btn as EM_Pro172_276_, order0_.EM_Prtoma_Tomaticket_ID as EM_Prt173_276_, order0_.EM_Cactl_IsCopy as EM_Cac174_276_, order0_.EM_Prtoma_Jsonorder as EM_Prt175_276_, order0_.EM_Prres_Paid_On_Credit as EM_Prr176_276_, order0_.EM_Prtoma_Grossamount as EM_Prt177_276_, order0_.EM_Cactl_Internal_Notes_Group as EM_Cac178_276_, order0_.EM_Prouti_Changebpartner_Bgt as EM_Pro179_276_, order0_.EM_Prrgr_Locator_ID as EM_Prr180_276_, order0_.EM_Paytef_Transactionreference as EM_Pay181_276_, order0_.EM_Cactl_Indirect_Cost_ID as EM_Cac182_276_, order0_.EM_Cactl_Calculate_Cost as EM_Cac183_276_, order0_.EM_Cactl_Totalcost as EM_Cac184_276_, order0_.EM_Cactl_Forceselectedproject as EM_Cac185_276_, order0_.EM_Cactl_Verified_Return as EM_Cac186_276_, order0_.EM_Cactl_Duplicate_Budget as EM_Cac187_276_, order0_.EM_Prres_Orig_Order_ID as EM_Prr188_276_, order0_.EM_Prcpr_Is_Cloned as EM_Prc189_276_, order0_.EM_Prouti_Select_Soline as EM_Pro190_276_, order0_.EM_Prouti_Return_Quantity as EM_Pro191_276_, order0_.EM_Prqr_Executecredit as EM_Prq192_276_, order0_.Em_Prqr_Credit_Purchase_ID as Em_Prq193_276_ from C_Order order0_ cross join C_DocType documentty1_ where order0_.C_DocTypeTarget_ID=documentty1_.C_DocType_ID and order0_.IsSOTrx=$43 and documentty1_.IsReturn=$44 and (order0_.Updated>$1 or order0_.Processed=$45) and (order0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (order0_.AD_Client_ID in ($40 , $41)) order by order0_.DatePromised, order0_.C_Order_ID limit $42
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
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
e58a3f6831select 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((businesspa1_.Value||$43||businesspa1_.Name||$44||coalesce(to_char(businesspa1_.TaxID), $45)||$46||coalesce(to_char(businesspa1_.Name2), $47))) like upper($1) escape $48) and invoice0_.IsSOTrx=$49 and invoice0_.DocStatus<>$50 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_.C_Invoice_ID desc limit $42
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 )
3048d15da5select a.id, ev.value as account_id, ev.name, a.initialamt as SALDO_INICIAL, a.amtacctcr, a.amtacctdr, A.INITIALAMT+A.AMTACCTDR-A.AMTACCTCR AS SALDO_FINAL, a.groupbyid, CASE ad_column_identifier ($16,groupbyid,TO_CHAR($1)) WHEN $17 THEN $18 ELSE ad_column_identifier ($19,groupbyid,TO_CHAR($2)) END AS groupbyname from( SELECT sum(case when (DATEACCT < TO_DATE($3) or (DATEACCT = TO_DATE($4) and F.FACTACCTTYPE = $5)) then F.AMTACCTDR - F.AMTACCTCR else $20 end) as initialamt, sum(case when (DATEACCT >= TO_DATE($6) AND F.FACTACCTTYPE not in($21, $22, $23)) or (DATEACCT = TO_DATE($7) and F.FACTACCTTYPE = $8) then F.AMTACCTDR else $24 end) as AMTACCTDR, sum(case when (DATEACCT >= TO_DATE($9) AND F.FACTACCTTYPE not in($25, $26, $27)) or (DATEACCT = TO_DATE($10) and F.FACTACCTTYPE = $11) then F.AMTACCTCR else $28 end) as AMTACCTCR, F.ACCOUNT_ID AS ID, to_char($29) AS groupbyid FROM FACT_ACCT F WHERE F.AD_ORG_ID IN($30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65) AND F.AD_CLIENT_ID IN($66,$67) AND F.AD_ORG_ID IN ($68,$69,$70,$71,$72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105) AND DATEACCT < TO_DATE($12) AND $106=$107 AND F.C_ACCTSCHEMA_ID = $13 AND F.ISACTIVE=$108 group by F.ACCOUNT_ID ) a, c_elementvalue ev where a.id = ev.c_elementvalue_id and ev.elementlevel = $14 AND $109=$110 AND EV.VALUE <= $15 and (a.initialamt <>$111 or a.amtacctcr <>$112 or a.amtacctdr<>$113) order by ev.value, ev.name, id, groupbyname
964d1d9b09select materialmg0_.M_InOut_ID as M_InOut_1_463_, materialmg0_.AD_Client_ID as AD_Clien2_463_, materialmg0_.AD_Org_ID as AD_Org_I3_463_, materialmg0_.IsActive as IsActive4_463_, materialmg0_.Created as Created5_463_, materialmg0_.CreatedBy as CreatedB6_463_, materialmg0_.Updated as Updated7_463_, materialmg0_.UpdatedBy as UpdatedB8_463_, materialmg0_.IsSOTrx as IsSOTrx9_463_, materialmg0_.DocumentNo as Documen10_463_, materialmg0_.DocAction as DocActi11_463_, materialmg0_.DocStatus as DocStat12_463_, materialmg0_.Posted as Posted13_463_, materialmg0_.Processing as Process14_463_, materialmg0_.Processed as Process15_463_, materialmg0_.C_DocType_ID as C_DocTy16_463_, materialmg0_.Description as Descrip17_463_, materialmg0_.C_Order_ID as C_Order18_463_, materialmg0_.DateOrdered as DateOrd19_463_, materialmg0_.IsPrinted as IsPrint20_463_, materialmg0_.MovementType as Movemen21_463_, materialmg0_.MovementDate as Movemen22_463_, materialmg0_.DateAcct as DateAcc23_463_, materialmg0_.C_BPartner_ID as C_BPart24_463_, materialmg0_.C_BPartner_Location_ID as C_BPart25_463_, materialmg0_.M_Warehouse_ID as M_Wareh26_463_, materialmg0_.POReference as PORefer27_463_, materialmg0_.DeliveryRule as Deliver28_463_, materialmg0_.FreightCostRule as Freight29_463_, materialmg0_.FreightAmt as Freight30_463_, materialmg0_.DeliveryViaRule as Deliver31_463_, materialmg0_.M_Shipper_ID as M_Shipp32_463_, materialmg0_.C_Charge_ID as C_Charg33_463_, materialmg0_.ChargeAmt as ChargeA34_463_, materialmg0_.PriorityRule as Priorit35_463_, materialmg0_.DatePrinted as DatePri36_463_, materialmg0_.C_Invoice_ID as C_Invoi37_463_, materialmg0_.CreateFrom as CreateF38_463_, materialmg0_.GenerateTo as Generat39_463_, materialmg0_.AD_User_ID as AD_User40_463_, materialmg0_.SalesRep_ID as SalesRe41_463_, materialmg0_.NoPackages as NoPacka42_463_, materialmg0_.PickDate as PickDat43_463_, materialmg0_.ShipDate as ShipDat44_463_, materialmg0_.TrackingNo as Trackin45_463_, materialmg0_.AD_OrgTrx_ID as AD_OrgT46_463_, materialmg0_.C_Project_ID as C_Proje47_463_, materialmg0_.C_Campaign_ID as C_Campa48_463_, materialmg0_.C_Activity_ID as C_Activ49_463_, materialmg0_.User1_ID as User50_463_, materialmg0_.User2_ID as User51_463_, materialmg0_.UpdateLines as UpdateL52_463_, materialmg0_.Islogistic as Islogis53_463_, materialmg0_.Calculate_Freight as Calcula54_463_, materialmg0_.Delivery_Location_ID as Deliver55_463_, materialmg0_.M_FreightCategory_ID as M_Freig56_463_, materialmg0_.Freight_Currency_ID as Freight57_463_, materialmg0_.RM_Receipt_PickEdit as RM_Rece58_463_, materialmg0_.RM_Shipment_Pickedit as RM_Ship59_463_, materialmg0_.EM_Obcma_C_Poc_Email_ID as EM_Obcm60_463_, materialmg0_.M_Condition_Goods_ID as M_Condi61_463_, materialmg0_.A_Asset_ID as A_Asset62_463_, materialmg0_.C_Costcenter_ID as C_Costc63_463_, materialmg0_.Process_Goods_Java as Process64_463_, materialmg0_.Isnettingshipment as Isnetti65_463_, materialmg0_.Iscompletelyinvoiced as Iscompl66_463_, materialmg0_.EM_OBMFM_Freight_ID as EM_OBMF67_463_, materialmg0_.EM_Sgpcrm_Securitygroups_ID as EM_Sgpc68_463_, materialmg0_.EM_OBMFM_Delivery_Charges as EM_OBMF69_463_, materialmg0_.Invoicefromshipment as Invoice70_463_, materialmg0_.Bpartner_Extref as Bpartne71_463_, materialmg0_.EM_Prouti_Changebpartner as EM_Prou72_463_, materialmg0_.EM_Prouti_Totalqtyreceived as EM_Prou73_463_, materialmg0_.EM_OBMFM_Deliverynotes as EM_OBMF74_463_, materialmg0_.EM_Prres_Description as EM_Prre75_463_, materialmg0_.EM_Prres_Jsoninfo as EM_Prre76_463_, materialmg0_.EM_Prrgr_Description as EM_Prrg77_463_, materialmg0_.EM_Prrgr_Jsoninfo as EM_Prrg78_463_, materialmg0_.EM_Prouti_Initial_Bp_ID as EM_Prou79_463_, materialmg0_.EM_Prouti_Move_Stock as EM_Prou80_463_, materialmg0_.EM_Prouti_Stock_Moved as EM_Prou81_463_, materialmg0_.EM_Prqr_Execute as EM_Prqr82_463_, materialmg0_.em_prlab_desc as em_prla83_463_ from M_InOut materialmg0_ left outer join C_Order order1_ on materialmg0_.C_Order_ID=order1_.C_Order_ID cross join C_DocType documentty2_ where materialmg0_.C_DocType_ID=documentty2_.C_DocType_ID and (materialmg0_.MovementType in ($43 , $44)) and materialmg0_.Islogistic=$45 and documentty2_.IsReturn=$46 and (materialmg0_.Updated>$1 or materialmg0_.Processed=$47) and (materialmg0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39)) and (materialmg0_.AD_Client_ID in ($40 , $41)) order by order1_.DocumentNo desc, order1_.DateOrdered desc, order1_.GrandTotal desc, materialmg0_.M_InOut_ID desc limit $42
59ed037ff5UPDATE m_requisitionline rl SET em_cactl_consumption = cactl_calculate_consumption(rl.m_product_id, rl.ad_org_id, rl.ad_client_id) FROM m_requisition r WHERE rl.reqstatus = $1 AND rl.m_requisition_id = r.m_requisition_id AND r.docstatus = $2
531757f0c6select sum(invoice0_.GrandTotal) as col_0_0_ from C_Invoice invoice0_ inner join C_Order order1_ on invoice0_.C_Order_ID=order1_.C_Order_ID where (upper((order1_.DocumentNo||$43||coalesce(to_char(order1_.DateOrdered), $44)||$45||coalesce(to_char(order1_.GrandTotal), $46))) like upper($1) escape $47) and invoice0_.IsSOTrx=$48 and invoice0_.DocStatus<>$49 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
bf18c8b741select documentno, dateacct, substr(ad_column_identifier(tablename, id, $1) ||(CASE WHEN description IS NULL THEN $60 ELSE $61 || DESCRIPTION || $62 END),$63,$64) as description, GRANDTOTAL as amount, document as doctype, id as id, tab_id, docbasetype, record_id from (select ad_client_id, ad_org_id, TO_CHAR(documentno) AS DOCUMENTNO, dateacct, $65 as tablename, C_bpartner_id as id, GRANDTOTAL, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=c_invoice.c_doctype_id and ad_language=$2 and ad_client_id=$3)), $66) as document, $67 as tab_id, (select docbasetype from c_doctype where c_doctype_id=c_invoice.c_doctype_id) as docbasetype, c_invoice_id as record_id from c_invoice where processed = $68 and posted not in ($69, $70, $71) and issotrx = $72 and docstatus <> $73 and $74=(select max(isactive) from c_acctschema_table where ad_table_id=$75 and ad_client_id=$4) union all select ad_client_id, ad_org_id, TO_CHAR(documentno) AS DOCUMENTNO, dateacct, $76 as tablename, m_inout_id as id, $77 as GRANDTOTAL, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=m_inout.c_doctype_id and ad_language=$5 and ad_client_id=$6)), $78) as document, $79 as tab_id, (select docbasetype from c_doctype where c_doctype_id=m_inout.c_doctype_id) as docbasetype, m_inout_id as record_id from m_inout where processed = $80 and posted not in ($81, $82, $83) and issotrx = $84 and $85=(select max(isactive) from c_acctschema_table where ad_table_id=$86 and ad_client_id=$7) union all select ad_client_id, ad_org_id, TO_CHAR(documentno) AS DOCUMENTNO, dateacct, $87 as tablename, m_inout_id as id, $88 as GRANDTOTAL, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=m_inout.c_doctype_id and ad_language=$8 and ad_client_id=$9)), $89) as document, $90 as tab_id, (select docbasetype from c_doctype where c_doctype_id=m_inout.c_doctype_id) as docbasetype, m_inout_id as record_id from m_inout where processed = $91 and posted not in ($92, $93, $94) and issotrx = $95 and $96=(select max(isactive) from c_acctschema_table where ad_table_id=$97 and ad_client_id=$10) union all select ad_client_id, ad_org_id, TO_CHAR(documentno) AS DOCUMENTNO, dateacct, $98 as tablename, C_bpartner_id as id, GRANDTOTAL, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=c_invoice.c_doctype_id and ad_language=$11 and ad_client_id=$12)), $99) as document, $100 as tab_id, (select docbasetype from c_doctype where c_doctype_id=c_invoice.c_doctype_id) as docbasetype, c_invoice_id as record_id from c_invoice where processed = $101 and posted not in ($102, $103, $104) and issotrx = $105 and docstatus <> $106 and $107=(select max(isactive) from c_acctschema_table where ad_table_id=$108 and ad_client_id=$13) union all select ad_client_id, ad_org_id, TO_CHAR(name) AS DOCUMENTNO, dateacct, $109 as tablename, C_Cash_id as id, c_cash.STATEMENTDIFFERENCE, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=(select min(c_doctype_id) from c_doctype where ad_client_id=$14 and docbasetype=$110) and ad_language=$15 and ad_client_id=$16)), $111) as document, $112 as tab_id, $113 as docbasetype, c_cash_id as record_id from C_Cash where processed = $114 and posted not in ($115, $116, $117) and $118=(select max(isactive) from c_acctschema_table where ad_table_id=$119 and ad_client_id=$17) union all select ad_client_id, ad_org_id, TO_CHAR(name) AS DOCUMENTNO, statementdate, $120 as tablename, C_bankstatement_id as id, STATEMENTDIFFERENCE, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=(select min(c_doctype_id) from c_doctype where ad_client_id=$18 and docbasetype=$121) and ad_language=$19 and ad_client_id=$20)), $122) as document, $123 as tab_id, $124 as docbasetype, c_bankstatement_id as record_id from c_bankstatement where processed = $125 and posted not in ($126, $127, $128) and $129=(select max(isactive) from c_acctschema_table where ad_table_id=$130 and ad_client_id=$21) union all select ad_client_id, ad_org_id, TO_CHAR(documentno) AS DOCUMENTNO, dateacct, $131 as tablename, C_Settlement_id as id, generatedamt, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=s.c_doctype_id and ad_language=$22 and ad_client_id=$23)), $132) as document, $133 as tab_id, $134 as docbasetype, c_Settlement_id as record_id from c_Settlement s where processed = $135 and posted not in ($136, $137, $138) and settlementtype = $139 and $140=(select max(isactive) from c_acctschema_table where ad_table_id=$141 and ad_client_id=$24) and exists (select $142 from c_debt_payment p where p.c_settlement_generate_id = s.c_settlement_id and p.isdirectposting=$143) union all select ad_client_id, ad_org_id, TO_CHAR(documentno) AS DOCUMENTNO, dateacct, $144 as tablename, C_Settlement_id as id, generatedamt, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=c_Settlement.c_doctype_id and ad_language=$25 and ad_client_id=$26)), $145) as document, $146 as tab_id, $147 as docbasetype, c_Settlement_id as record_id from c_Settlement where processed = $148 and posted not in ($149, $150, $151) and settlementtype <> $152 and $153=(select max(isactive) from c_acctschema_table where ad_table_id=$154 and ad_client_id=$27) union all select ad_client_id, ad_org_id, TO_CHAR(documentno) AS DOCUMENTNO, dateacct, $155 as tablename, GL_Journal_id as id, totaldr, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=GL_Journal.c_doctype_id and ad_language=$28 and ad_client_id=$29)), $156) as document, $157 as tab_id, (select docbasetype from c_doctype where c_doctype_id=GL_Journal.c_doctype_id) as docbasetype, GL_Journal_id as record_id from GL_Journal where processed = $158 and posted not in ($159, $160, $161) and $162=(select max(isactive) from c_acctschema_table where ad_table_id=$163 and ad_client_id=$30) union all select ad_client_id, ad_org_id, TO_CHAR(name) AS DOCUMENTNO, movementdate , $164 as tablename, m_inventory_id as id, $165 as GRANDTOTAL, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=(select min(c_doctype_id) from c_doctype where ad_client_id=$31 and docbasetype=$166) and ad_language=$32 and ad_client_id=$33)), $167) as document, $168 as tab_id, $169 as docbasetype, m_inventory_id as record_id from m_inventory where processed = $170 and posted not in ($171, $172, $173) and $174=(select max(isactive) from c_acctschema_table where ad_table_id=$175 and ad_client_id=$34) union all select ad_client_id, ad_org_id, TO_CHAR(documentno) AS DOCUMENTNO, paymentdate , $176 as tablename, c_bpartner_id as id, amount as GRANDTOTAL, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=(select min(c_doctype_id) from c_doctype where ad_client_id=$35 and docbasetype=$177) and ad_language=$36 and ad_client_id=$37)), $178) as document, $179 as tab_id, $180 as docbasetype, fin_payment_id as record_id from fin_payment where processed = $181 and posted not in ($182, $183, $184) and isreceipt=$185 and status <> $186 and $187=(select max(isactive) from c_acctschema_table where ad_table_id=$188 and ad_client_id=$38) union all select ad_client_id, ad_org_id, TO_CHAR(documentno) AS DOCUMENTNO, paymentdate , $189, c_bpartner_id as id, amount as GRANDTOTAL, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=(select min(c_doctype_id) from c_doctype where ad_client_id=$39 and docbasetype=$190) and ad_language=$40 and ad_client_id=$41)), $191) as document, $192 as tab_id, $193 as docbasetype, fin_payment_id as record_id from fin_payment where processed = $194 and posted not in ($195, $196, $197) and isreceipt=$198 and status <> $199 and $200=(select max(isactive) from c_acctschema_table where ad_table_id=$201 and ad_client_id=$42) union all select ad_client_id, ad_org_id, $202 || to_char(line) AS DOCUMENTNO, dateacct, $203 as tablename, fin_financial_account_id as id, depositamt-paymentamt as GRANDTOTAL, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=(select min(c_doctype_id) from c_doctype where ad_client_id=$43 and docbasetype=$204) and ad_language=$44 and ad_client_id=$45)), $205) as document, $206 as tab_id, $207 as docbasetype, fin_finacc_transaction_id as record_id from fin_finacc_transaction where processed = $208 and posted not in ($209, $210, $211) and $212=(select max(isactive) from c_acctschema_table where ad_table_id=$213 and ad_client_id=$46) union all select ad_client_id, ad_org_id, TO_CHAR(documentno) AS DOCUMENTNO, statementdate, $214 as talename, fin_financial_account_id as id, endingbalance - startingbalance as GRANDTOTAL, $215 as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=(select min(c_doctype_id) from c_doctype where ad_client_id=$47 and docbasetype=$216) and ad_language=$48 and ad_client_id=$49)), $217) as document, $218 as tab_id, $219 as docbasetype, fin_reconciliation_id as record_id from fin_reconciliation where processed = $220 and posted not in ($221, $222, $223) and $224=(select max(isactive) from c_acctschema_table where ad_table_id=$225 and ad_client_id=$50) union all select ad_client_id, ad_org_id, TO_CHAR(name) AS DOCUMENTNO, movementdate , $226 as tablename, m_movement_id as id, $227 as GRANDTOTAL, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=(select min(c_doctype_id) from c_doctype where ad_client_id=$51 and docbasetype=$228) and ad_language=$52 and ad_client_id=$53)), $229) as document, $230 as tab_id, $231 as docbasetype, m_movement_id as record_id from m_movement where processed = $232 and posted not in ($233, $234, $235) and $236=(select max(isactive) from c_acctschema_table where ad_table_id=$237 and ad_client_id=$54) union all select ad_client_id, ad_org_id, TO_CHAR(documentno) AS DOCUMENTNO, dateacct , $238 as tablename, c_dp_management_id as id, $239 as GRANDTOTAL, to_char(description) as description, coalesce(to_char((select printname from c_doctype_trl where c_doctype_id=(select min(c_doctype_id) from c_doctype where ad_client_id=$55 and docbasetype=$240) and ad_language=$56 and ad_client_id=$57)), $241) as document, $242 as tab_id, $243 as docbasetype, c_dp_management_id as record_id from c_dp_management where processed = $244 and posted not in ($245, $246, $247) and $248=(select max(isactive) from c_acctschema_table where ad_table_id=$249 and ad_client_id=$58) ) AAA where ad_client_id = $59 and ad_org_id in ($250,$251,$252,$253,$254,$255,$256,$257,$258,$259,$260,$261,$262,$263,$264,$265,$266,$267,$268,$269,$270,$271,$272,$273,$274,$275,$276,$277,$278,$279,$280,$281,$282,$283,$284,$285,$286,$287) and $288=$289 order by document, dateacct, description
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)
bba759f90aWITH 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
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_inst4354 GB71212305386103024114010265174513770
prpass_pass_inst(TOAST)
openbravopg_defaultpublicc_order2544 GB337752162453255160286443517097110009
c_order(TOAST)
openbravopg_defaultpublicm_inout641 GB158610910659716438543951107446369
m_inout(TOAST)259914357
openbravopg_defaultpg_temp_15ad_context_info348 GB740097395773956
openbravopg_defaultpublicprpass_timeslots_res264 GB105036876048536911662407136310503
prpass_timeslots_res(TOAST)
openbravopg_defaultpublicprges_records187 GB1868324408532440855511786
prges_records(TOAST)4040255608521
openbravopg_defaultpublicc_bpartner96 GB91923652469568741066826637
c_bpartner(TOAST)
openbravopg_defaultpublicc_invoice90 GB135446151329878564764245116818219779
c_invoice(TOAST)
openbravopg_defaultpublicprres_allergens_product76 GB156533231733172
openbravopg_defaultpg_catalogpg_class57 GB43061193405018361525532217456221620
openbravopg_defaultpublicfin_payment56 GB15255381625158712949205288124
fin_payment(TOAST)
openbravopg_defaultpublicm_product54 GB55369695225115311345526473
m_product(TOAST)
openbravopg_defaultpublicfin_payment_scheduledetail43 GB16178099191299436111699143237
fin_payment_scheduledetail(TOAST)
openbravopg_defaultpublicad_audit_trail43 GB83848447633534
ad_audit_trail(TOAST)
openbravopg_defaultpublicm_storage_detail39 GB138712059531627440135701939285
m_storage_detail(TOAST)
openbravopg_defaultpublicc_orderline25 GB364353378129775283911526688311785
c_orderline(TOAST)
openbravopg_defaultpublicad_column18 GB238918196333190861925912
ad_column(TOAST)
openbravopg_defaultpublicad_table16 GB1041621403315661081214
ad_table(TOAST)
openbravopg_defaultpublicm_transaction13 GB1160454417676114294303431035
m_transaction(TOAST)
openbravopg_defaultpublicm_inoutline12 GB2564235445528550288122401302099
m_inoutline(TOAST)

Top tables by blocks fetched

DBTablespaceSchemaTableHeapIxTOASTTOAST-Ix
Blks%TotalBlks%TotalBlks%TotalBlks%Total
openbravopg_defaultpublicc_order290614129127.753529763673.37
openbravopg_defaultpublicc_invoice283734724127.092945678712.81
openbravopg_defaultpublicfin_finacc_transaction6510050346.2289682870.09
openbravopg_defaultpublicprpass_timeslots_res6036689615.7699189420.09
openbravopg_defaultpublicprpass_pass_inst4503774174.30573637030.55
openbravopg_defaultpublicm_inout1813772171.732458324562.3554610.00635640.00
openbravopg_defaultpublicc_orderline943046900.903238519803.09
openbravopg_defaultpublicm_inoutline565686820.542265701152.16
openbravopg_defaultpublicc_invoiceline529749950.512250884702.15
openbravopg_defaultpublicfin_payment_schedule275863450.26826964580.79
openbravopg_defaultpublicm_costing936784790.8954779270.05
openbravopg_defaultpublicfact_acct665722150.6451614080.05
openbravopg_defaultpublicprges_records277122130.2697773760.094152280.004040540.00
openbravopg_defaultpublicm_product177639120.17198159820.19
openbravopg_defaultpublicad_treenode9488110.01236429200.23
openbravopg_defaultpg_temp_15ad_context_info230078520.22
openbravopg_defaultpublicc_bpartner155474380.1573929400.07
openbravopg_defaultpublicfin_payment102906090.10101055730.10
openbravopg_defaultpublicad_org80763420.0879068130.08
openbravopg_defaultpublicc_doctype80016880.0879502300.08

Top tables by blocks read

DBTablespaceSchemaTableHeapIxTOASTTOAST-IxHit(%)
Blks%TotalBlks%TotalBlks%TotalBlks%Total
openbravopg_defaultpublicc_order11982388036.4581481242.4896.07
openbravopg_defaultpublicprpass_pass_inst3803602811.5737588891.1491.77
openbravopg_defaultpublicc_invoice217875576.6382380562.5199.04
openbravopg_defaultpublicfact_acct259025847.8835715031.0958.91
openbravopg_defaultpublicfin_finacc_transaction130688403.9830694810.9397.55
openbravopg_defaultpublicm_inout140008224.2619716830.6035860.0017880.0096.26
openbravopg_defaultpublicc_orderline102673923.1238855081.1896.62
openbravopg_defaultpublicm_inoutline73634772.2434511231.0596.18
openbravopg_defaultpublicc_invoiceline38935211.1835415771.0897.33
openbravopg_defaultpublicm_costing28395930.862709510.0896.86
openbravopg_defaultpublicm_transaction22578960.696488250.2081.51
openbravopg_defaultpublicfin_payment_schedule18570860.562290680.0798.11
openbravopg_defaultpublicprpass_pass_trans6587230.2013387160.4182.14
openbravopg_defaultpublicfin_payment17870040.54147400.0091.17
openbravopg_defaultpublicad_audit_trail14194840.4374720.0074.92
openbravopg_defaultpublicprpass_timeslots_res10448560.321846580.0699.80
openbravopg_defaultpublicfin_payment_scheduledetail7227160.22838730.0388.85
openbravopg_defaultpublicad_image2390.00460.006474450.20130140.003.54
openbravopg_defaultpublicm_productionplan3021500.091524020.0583.93
openbravopg_defaultpublicm_productionline2982890.091189970.0494.90

Top DML tables

DBTablespaceSchemaTableInsUpdDelUpd(HOT)SeqScanSeqFetIxScanIxFet
openbravopg_defaultpublicobmobc_logclient75718759722144458
obmobc_logclient(TOAST)1444
openbravopg_defaultpg_temp_15ad_context_info73957739567400974008
openbravopg_defaultprofilelast_stat_indexes70702156170702184113123243310425773
openbravopg_defaultpublicc_invoice42451168182197791363146117544615132987856476
c_invoice(TOAST)
openbravopg_defaultprofilelast_stat_tables414043664414036118466245684074034146
openbravopg_defaultpublicc_import_entry124991249812460531382248343640261588
c_import_entry(TOAST)18368183682529991488
openbravopg_defaultpublicad_ep_instance_para356833568359774276580
ad_ep_instance_para(TOAST)
openbravopg_defaultpublicm_stock_aux15792352001579226042277203157538
m_stock_aux(TOAST)
openbravopg_defaultpublicm_storage_detail13570193928513877109023812059531627440
m_storage_detail(TOAST)
openbravopg_defaultpublicm_transaction142943034310351305643571604544176761
m_transaction(TOAST)
openbravopg_defaultpg_catalogpg_statistic293652792215890951418978
pg_statistic(TOAST)49324932174843340525
openbravopg_defaultpublicc_orderline91152668831178534309085464353378129775283
c_orderline(TOAST)
openbravopg_defaultpublicc_import_entry_archive281427072180505141302707
c_import_entry_archive(TOAST)150471457994873496703
openbravopg_defaultpublicprpass_pass_inst102651745137707122149983896123053861030241140
prpass_pass_inst(TOAST)
openbravopg_defaultpublicfact_acct2067468393746515166883549
fact_acct(TOAST)
openbravopg_defaultprofilelast_stat_user_functions1242015691242080388369360
last_stat_user_functions(TOAST)
openbravopg_defaultpg_temp_5ad_context_info12897128961350713506
openbravopg_defaultpublicm_productionline8586168831608421298814069671
m_productionline(TOAST)
openbravopg_defaultpublicprsync_entry1530422513495210878
prsync_entry(TOAST)25235471323547
openbravopg_defaultpublicfin_payment2949205288124159457896925538162515871
fin_payment(TOAST)

Top tables by updated/deleted tuples

DBTablespaceSchemaTableUpdUpd(HOT)DelVacuumAutoVacuumAnalyzeAutoAnalyze
openbravopg_defaultpublicc_invoice116818197792
c_invoice(TOAST)
openbravopg_defaultpublicobmobc_logclient7597211
obmobc_logclient(TOAST)41
openbravopg_defaultpg_temp_15ad_context_info73956
openbravopg_defaultprofilelast_stat_indexes1561707021404623
openbravopg_defaultpublicm_storage_detail5701939285210
m_storage_detail(TOAST)
openbravopg_defaultpublicm_stock_aux352002604215792104187
m_stock_aux(TOAST)
openbravopg_defaultprofilelast_stat_tables366461414031404623
openbravopg_defaultpublicc_import_entry124981246099200
c_import_entry(TOAST)1836814
openbravopg_defaultpublicad_ep_instance_para35683521698
ad_ep_instance_para(TOAST)
openbravopg_defaultpg_catalogpg_statistic29365279222
pg_statistic(TOAST)49329
openbravopg_defaultpublicm_transaction303431035
m_transaction(TOAST)
openbravopg_defaultpublicc_orderline26688117853
c_orderline(TOAST)
openbravopg_defaultpublicprsync_entry302542111
prsync_entry(TOAST)235471
openbravopg_defaultpg_catalogpg_class22174216205621222
openbravopg_defaultpublicfin_payment2052881241
fin_payment(TOAST)
openbravopg_defaultpublicprpass_pass_inst174513770
prpass_pass_inst(TOAST)
openbravopg_defaultpublicc_import_entry_archive270711
c_import_entry_archive(TOAST)145791
openbravopg_defaultpublicc_order17097100091
c_order(TOAST)
openbravopg_defaultpublicm_productionline1688316084
m_productionline(TOAST)
openbravopg_defaultpublicfin_finacc_transaction154042765
fin_finacc_transaction(TOAST)

Top growing tables

DBTablespaceSchemaTableSizeGrowthInsUpdDelUpd(HOT)
openbravopg_defaultpublicfact_acct31 GB19 MB20674683937
fact_acct(TOAST)
openbravopg_defaultpublicobmobc_logclient1402 MB16 MB7571875972
obmobc_logclient(TOAST)280 kB14
openbravopg_defaultpublicc_orderline8639 MB14 MB911526688311785
c_orderline(TOAST)
openbravopg_defaultpublicc_order7735 MB14 MB443517097110009
c_order(TOAST)
openbravopg_defaultpublicm_productionline7831 MB9520 kB85861688316084
m_productionline(TOAST)
openbravopg_defaultpublicprpass_pass_inst6266 MB8792 kB10265174513770
prpass_pass_inst(TOAST)
openbravopg_defaultpublicc_import_entry_archive50 MB264 kB28142707
c_import_entry_archive(TOAST)997 MB7480 kB1504714579
openbravopg_defaultpublicc_invoiceline7410 MB5616 kB86732749772196
c_invoiceline(TOAST)
openbravopg_defaultpublicm_inout4157 MB4864 kB43951107446369
m_inout(TOAST)29 MB
openbravopg_defaultpublicm_inoutline5964 MB4672 kB88122401302099
m_inoutline(TOAST)
openbravopg_defaultpublicc_orderlinetax4732 MB4120 kB919624331372025
c_orderlinetax(TOAST)
openbravopg_defaultpublicc_invoicelinetax4700 MB3856 kB870022451281994
c_invoicelinetax(TOAST)
openbravopg_defaultpublicprpass_pass_trans5145 MB3848 kB9613
openbravopg_defaultpublicfin_finacc_transaction3416 MB2832 kB3210154042765
fin_finacc_transaction(TOAST)
openbravopg_defaultpublicad_audit_trail530 MB1112 kB3534
ad_audit_trail(TOAST)
openbravopg_defaultpublicm_costing1202 MB664 kB1861188220
m_costing(TOAST)
openbravopg_defaultpublicc_import_entry512 kB160 kB124991249812460
c_import_entry(TOAST)136 kB48 kB1836818368
openbravopg_defaultpublicprges_records103 MB168 kB5511786
prges_records(TOAST)536 kB1
openbravopg_defaultpublicm_product10232 kB96 kB5526473
m_product(TOAST)
openbravopg_defaultpublicm_productionplan1238 MB72 kB185
m_productionplan(TOAST)

Top indexes by blocks fetched

DBTablespaceSchemaTableIndexScansBlks%Total
openbravopg_defaultpublicc_orderc_order_key750713033003220642.87
openbravopg_defaultpublicm_inoutlinem_inoutline_orderline562098692256305002.15
openbravopg_defaultpublicc_invoicelinec_invoiceline_orderline557988242239635462.14
openbravopg_defaultpublicm_inoutm_inout_key547912922196152542.10
openbravopg_defaultpublicc_invoicec_invoice_key543727162184757722.09
openbravopg_defaultpublicc_orderlineem_obpos_orderedqty484957261953988771.87
openbravopg_defaultpublicfin_payment_schedulefin_payment_schedule_key20222161810876570.77
openbravopg_defaultpublicc_orderlinec_orderline_product2196910725146760.69
openbravopg_defaultpublicc_invoicec_invoice_client_org_date_doc65933690676100.66
openbravopg_defaultpublicc_orderlinec_orderline_key13377058534848230.51
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_orderline12247018490173040.47
openbravopg_defaultpublicc_orderc_order_client_org_date_docno62209455465090.43
openbravopg_defaultpublicm_inoutm_inout_order6204754248950630.24
openbravopg_defaultpublicad_treenodead_treenode_tree_node_un938485235144380.22
openbravopg_defaultpublicm_productm_product_key9681671193686990.18
openbravopg_defaultpublicm_product_trlm_product_trl_product_langu_un12042252120628750.12
openbravopg_defaultpublicprpass_pass_transprpass_pass_trans_inst2569880103362410.10
openbravopg_defaultpublicprges_recordsprges_records_key317265895620990.09
openbravopg_defaultpublicfin_payment_detailfin_payment_detail_key247450395036740.09
openbravopg_defaultpublicfin_paymentfin_payment_key247146394866980.09

Top indexes by blocks read

DBTablespaceSchemaTableIndexScansBlk Reads%TotalHits(%)
openbravopg_defaultpublicc_invoicec_invoice_client_org_date_doc6593367974362.0790.16
openbravopg_defaultpublicc_orderc_order_client_org_date_docno6220952071941.5888.57
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_product2362134199351.0454.15
openbravopg_defaultpublicc_invoicelinec_invoiceline_orderline5579882434022451.0498.48
openbravopg_defaultpublicm_inoutlinem_inoutline_orderline5620986933862511.0398.50
openbravopg_defaultpublicfact_acctfact_acct_account859233530551.027.21
openbravopg_defaultpublicc_orderlineem_obpos_orderedqty4849572631797340.9798.37
openbravopg_defaultpublicfin_finacc_transactionfin_finacc_tr_account_line2049429981970.9157.28
openbravopg_defaultpublicm_inoutm_inout_key5479129215666490.4899.29
openbravopg_defaultpublicprpass_pass_transprpass_pass_trans_inst256988013192160.4087.24
openbravopg_defaultpublicc_invoicec_invoice_key5437271613091940.4099.40
openbravopg_defaultpublicc_orderc_order_documentno_id339212857490.3956.07
openbravopg_defaultpublicc_orderc_order_key750713039385150.2999.69
openbravopg_defaultpublicc_orderlinec_orderline_key133770586261330.1998.83
openbravopg_defaultpublicc_orderem_obpos_order_docno_trgm3473120340.0949.89
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_orderline122470182815250.0999.43
openbravopg_defaultpublicm_costingm_costing_product_date544852579080.0895.23
openbravopg_defaultpublicm_inoutm_inout_movementdate_id192400620.0757.38
openbravopg_defaultpublicc_orderem_obpos_applications_idx6801679000.0554.77
openbravopg_defaultpublicm_transactionm_transsaction_product43121669940.0575.51

Top growing indexes

DBTablespaceSchemaTableIndexIndexTable
SizeGrowthInsUpdDel
openbravopg_defaultpublicfact_acctfact_acct_key2644 MB17 MB20674683937
openbravopg_defaultpublicfact_acctfact_acct_line_id2743 MB12 MB20629683737
openbravopg_defaultpublicfact_acctfact_acct_group2488 MB6224 kB20370675537
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_order870 MB4296 kB917512379
openbravopg_defaultpublicc_orderlineem_obpos_orderedqty903 MB3264 kB9115149033
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_orderline789 MB2864 kB1026513681
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_context187 MB1632 kB3762975972
openbravopg_defaultpublicc_orderc_order_client_org_date_docno995 MB1384 kB425566391
openbravopg_defaultpublicc_invoicec_invoice_client_org_date_doc942 MB1360 kB4245970392
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_key729 MB1160 kB58217550
openbravopg_defaultpublicprpass_pass_instprpass_pass_inst_product768 MB1096 kB1023713667
openbravopg_defaultpublicm_productionlinem_productionline_prodplan1159 MB1040 kB4891462
openbravopg_defaultpublicc_orderlinec_orderline_product855 MB760 kB544194283
openbravopg_defaultpublicc_invoicec_invoice_key403 MB696 kB4245970392
openbravopg_defaultpublicfin_finacc_transactionfin_finacc_tr_account_line395 MB640 kB321012639
openbravopg_defaultpublicm_inoutm_inout_key400 MB408 kB439547054
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_pk241 MB272 kB2360175972
openbravopg_defaultpublicc_orderlinec_orderline_key785 MB160 kB9115149033
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_log_idx6576 kB152 kB7257475972
openbravopg_defaultpublicc_invoicelinec_invoiceline_invoice800 MB120 kB88781

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_idx6576 kB152 kB7257475972
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_context187 MB1632 kB3762975972
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_cache209 MB77175972
openbravopg_defaultpublicfact_acctfact_acct_line_id2743 MB12 MB20629683737
openbravopg_defaultpg_catalogpg_classpg_class_tblspc_relfilenode_index320 kB386343387
openbravopg_defaultpublicad_process_runad_process_run_ould_be_killed8192 bytes147147

User function statistics

Top functions by total time

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopublicto_char6583952981148.181148.180.0000.000
openbravopublicto_char535313180761.87761.870.0000.000
openbravopubliccactl_calculate_consumption1539752.32752.210.4890.489
openbravopublicto_char390854274190.87190.870.0000.000
openbravopublicc_order_post11338189.6813.380.1420.010
openbravopublicc_order_post1337189.650.040.1420.000
openbravopublicc_order_post11337189.610.030.1420.000
openbravopublicad_extension_point_handler791395.483.350.0120.000
openbravoprofiletake_sample2381.970.013.5640.001
openbravoprofiletake_sample_subset2381.960.083.5630.003
openbravoprofiletake_sample2381.882.143.5600.093
openbravoprofiledblink62171.2771.270.1150.115
openbravopublicpricm_createproductprice358162.0830.230.0170.008
openbravopublicc_invoice_create121058.318.030.0480.007
openbravoprofilecollect_pg_stat_statements_stats2157.100.642.7190.030
openbravopubliccactl_ep_before_order_price33053.7153.690.1630.163
openbravopublicc_invoice_post130444.7415.030.0340.012
openbravopublicto_number2672864441.8541.850.0000.000
openbravopublicto_date1344584634.0134.000.0000.000
openbravopublicm_inout_create113630.830.030.0270.000

Top functions by executions

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopublicto_char6583952981148.181148.180.0000.000
openbravopublicto_char535313180761.87761.870.0000.000
openbravopublicto_char390854274190.87190.870.0000.000
openbravopublicto_number2672864441.8541.850.0000.000
openbravopublicto_char178328579.489.480.0000.000
openbravopublicto_date1344584634.0134.000.0000.000
openbravopublicsubstract_days24666801.901.900.0000.000
openbravopublicad_istriggerenabled177964411.8111.810.0000.000
openbravopublicad_isorgincluded134893315.0615.060.0000.000
openbravopublicadd_days13289481.731.730.0000.000
openbravopublicto_date8686791.911.900.0000.000
openbravopublicuuid_generate_v46027182.222.220.0000.000
openbravopublicad_org_isinnaturaltree57007414.612.890.0000.000
openbravopublicget_uuid2009064.372.140.0000.000
openbravopublicto_char1932210.300.300.0000.000
openbravopublicprouti_qtyremainingorderline18294223.2023.200.0000.000
openbravopublictrunc1156490.250.250.0000.000
openbravopublictrunc1129600.230.230.0000.000
openbravopublicround964640.190.190.0000.000
openbravopublicobequals897640.280.280.0000.000

Top trigger functions by total time

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopublicpricm_productprice361962.350.090.0170.000
openbravopubliccactl_prod_g_prodboom_trg24859.140.630.2380.003
openbravopublicprres_prod_boom_allergens_trg234257.9314.690.0250.006
openbravopublicprres_allergens_prod_trg755143.1843.010.0060.006
openbravopublicm_requisitionorder_trg7735.9935.980.4670.467
openbravopublicm_productionline_trg2543619.743.690.0010.000
openbravopubliccactl_m_prodline_losses_trg853712.172.790.0010.000
openbravopublicc_orderline_trg23580610.623.190.0000.000
openbravopublicm_transaction_trg444969.325.090.0000.000
openbravopublicau_c_order_trg214939.068.750.0000.000
openbravopubliccactl_product_org251258.521.340.0000.000
openbravopublicc_invoiceline_trg2114998.062.920.0010.000
openbravopublicc_invoice_trg1238994.623.840.0000.000
openbravopublicaeatsii_invoice_trg1238974.402.140.0000.000
openbravopublicc_orderline2_trg358064.203.940.0000.000
openbravopublicc_invoice_trg21207682.801.610.0000.000
openbravopublicc_invoicelinetax_trg111372.481.630.0000.000
openbravopublicpriuti_c_invoice_ref_trg1207682.471.800.0000.000
openbravopublicc_orderlinetax_trg117762.452.010.0000.000
openbravopublicc_orderline_trg358062.211.950.0000.000

Vacuum-related statistics

Top tables by vacuum operations

DBTablespaceSchemaTableVacuum countAutovacuum countInsUpdDelUpd(HOT)
openbravopg_defaultpublicad_ep_instance_para5213568335683
openbravopg_defaultprofilelast_stat_tables1404140436644140361
openbravopg_defaultprofilelast_stat_indexes14070702156170702
openbravopg_defaultprofilelast_stat_user_functions1401242015691242080
openbravopg_defaultpublicm_stock_aux10415792352001579226042
openbravopg_defaultpublicc_import_entry99124991249812460
openbravopg_defaultpublicad_sequence641281412760
openbravopg_defaultpublicobpos_applications5063376329
openbravopg_defaultpublicfin_financial_account3830843084
openbravopg_defaultpublicobre_reservation3732319563257
openbravopg_defaultpg_catalogpg_class125532217456221620
openbravopg_defaultpublicobre_resource922342193
openbravopg_defaultpublicm_transaction_last6112894
openbravopg_defaultpg_catalogpg_type26731671
openbravopg_defaultpg_catalogpg_rewrite22182218
openbravopg_defaultpg_catalogpg_statistic22936527922
openbravopg_defaultpublicad_element_trl21102428209
openbravopg_defaultpublicad_error_log245044504
openbravopg_defaultpublicad_menu_trl212461076
openbravopg_defaultpublicad_message_trl291280411400

Top tables by analyze operations

DBTablespaceSchemaTableAnalyze countAutoanalyze countInsUpdDelUpd(HOT)
openbravopg_defaultpublicad_ep_instance_para6983568335683
openbravopg_defaultpublicc_import_entry200124991249812460
openbravopg_defaultpublicm_stock_aux18715792352001579226042
openbravopg_defaultpublicad_sequence1281281412760
openbravopg_defaultpublicobpos_applications9763376329
openbravopg_defaultprofilelast_stat_tables46234140436644140361
openbravopg_defaultprofilelast_stat_indexes462370702156170702
openbravopg_defaultprofilelast_stat_user_functions46231242015691242080
openbravopg_defaultpublicfin_financial_account4830843084
openbravopg_defaultpublicobre_reservation4532319563257
openbravopg_defaultpublicobre_resource2422342193
openbravopg_defaultpg_catalogpg_class225532217456221620
openbravopg_defaultprofilelast_stat_tablespaces214444
openbravopg_defaultpublicad_session16160100429688
openbravopg_defaultpublicm_storage_detail10135701939285
openbravopg_defaultpublicm_transaction_last10112894
openbravopg_defaultpublicc_bpartner866826637
openbravopg_defaultpublicad_process_request156050317490
openbravopg_defaultpg_catalogpg_type56731671
openbravopg_defaultpublicad_error_log445044504

Top indexes by estimated vacuum load

DBTablespaceSchemaTableIndex~Vacuum bytesVacuum cntAutovacuum cntIX sizeRelsize
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_timestamp285 MB1285 MB1402 MB
openbravopg_defaultpublicm_stock_auxm_stock_aux_aux_id258 MB1042544 kB4400 kB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_pk241 MB1241 MB1402 MB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_cache209 MB1209 MB1402 MB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_term_date202 MB1202 MB1402 MB
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_context187 MB1187 MB1402 MB
openbravopg_defaultpublicad_ep_instance_paraad_ep_instance_para_key175 MB521344 kB33 kB
openbravopg_defaultpublicc_import_entryem_prres_organization_idx134 MB991384 kB1301 kB
openbravopg_defaultpublicc_import_entryc_import_entry_key92 MB99952 kB1301 kB
openbravopg_defaultpublicc_import_entryem_prres_typeofdata_idx87 MB99904 kB1301 kB
openbravopg_defaultpublicc_import_entryc_import_entry_type_status83 MB99856 kB1301 kB
openbravopg_defaultpublicc_import_entryem_obpos_application_fk76 MB99784 kB1301 kB
openbravopg_defaultpublicm_stock_auxm_stock_aux_storage_detail_id74 MB104728 kB4400 kB
openbravopg_defaultprofilelast_stat_indexespk_last_stat_indexes72 MB138533 kB2032 kB
openbravopg_defaultpublicm_stock_auxm_stock_aux_key63 MB104616 kB4400 kB
openbravopg_defaultpublicc_import_entryc_import_entry_idx56 MB85680 kB1331 kB
openbravopg_defaultpublicm_storage_detailm_storage_detail_un40 MB220 MB29 MB
openbravopg_defaultprofilelast_stat_tablespk_last_stat_tables39 MB135296 kB1552 kB
openbravopg_defaultpublicm_storage_detailm_storage_detail_uom28 MB214 MB29 MB
openbravopg_defaultpublicm_storage_detailm_storage_detail_locator25 MB213 MB29 MB

Top tables by dead tuples ratio

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

DBSchemaTableLiveDead%DeadLast AVSize
openbravopg_toastpg_toast_26192449483162026-07-14 17:16:35.735391+017288 kB
openbravopg_toastpg_toast_232469134711764112026-05-19 02:38:47.391039+0129 MB
openbravopg_catalogpg_attribute37162374092026-07-14 06:40:29.107916+016840 kB
openbravopg_catalogpg_statistic10728111392026-07-14 21:01:54.18871+017032 kB
openbravopublicm_product15670172992026-02-20 19:44:18.669967+0010232 kB
openbravopublicfin_finacc_transaction660039664765582026-04-02 14:41:49.577329+013416 MB
openbravopublicc_invoice702033267358882026-07-08 00:23:08.546646+017098 MB
openbravopublicc_order727391165658587735 MB
openbravopublicm_requisitionline3180432890782026-07-06 12:22:50.3815+01184 MB
openbravopublicfact_acct37982364274626962025-07-31 23:28:10.407953+0131 GB
openbravopublicad_process_run21802121952026-06-01 11:38:18.108022+0122 MB
openbravopg_toastpg_toast_2302483379181457942026-05-19 02:10:58.737588+01997 MB
openbravopublicc_orderline1438996872281248639 MB
openbravopublicprpass_pass_inst1311775061461746266 MB
openbravopublicm_inout724782923930032025-10-20 23:54:32.431835+014157 MB
openbravopublicc_import_entry_archive89703270722025-12-16 22:55:58.255774+0050 MB
openbravopublicm_costing410187811842821202 MB
openbravopublicobmobc_logclient25676407190522025-12-16 23:13:25.786307+001402 MB
openbravoprofilesample_stat_tables2743365022026-07-14 23:00:55.442262+018656 kB
openbravopublicm_productionline2005512020630517831 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_statistic1072811139704387819557032 kB
openbravopg_catalogpg_attribute371623740374092026-07-14 13:13:46.985437+016840 kB
openbravopublicprges_records704991010675292026-03-31 15:00:51.685568+01103 MB
openbravopublicad_audit_trail21076128416996282026-06-21 20:32:38.637677+01530 MB
openbravopublicm_productionline20055120206305169951082026-04-18 16:29:40.193815+017831 MB
openbravopublicprpass_pass_inst13117750614617117537282026-04-13 09:36:44.580373+016266 MB
openbravopublicc_invoice702033267358855537172026-07-10 16:34:36.965521+017098 MB
openbravopublicm_requisitionline318043289072494972026-07-12 13:22:28.736582+01184 MB
openbravopublicm_costing410187811842823927852026-03-03 09:41:10.270329+001202 MB
openbravopublicm_product156701729102552026-07-13 10:43:57.196489+0110232 kB
openbravopublicfin_finacc_transaction660039664765531139142026-06-27 12:53:00.341557+013416 MB
openbravopublicc_order727391165658535304642026-06-29 09:41:55.68684+017735 MB
openbravopublicc_invoiceline142283754707957135242026-02-28 09:04:55.209925+007410 MB
openbravopublicc_invoicelinetax142744823486555739732026-03-02 14:36:24.388275+004700 MB
openbravopublicc_orderlinetax143757342979756425632026-03-03 11:11:52.370698+004732 MB
openbravopublicm_inoutline142303902767754647632026-03-06 11:59:32.517041+005964 MB
openbravopublicfact_acct37982364274626988035122026-06-25 13:36:17.490096+0131 GB
openbravopublicc_orderline1438996872281232707622026-07-06 00:03:35.926283+018639 MB
openbravopublicm_productionplan3447658959812522026-02-28 13:31:59.297829+001238 MB
openbravopublicprpass_pass_trans14727060539267622026-04-04 15:01:28.751084+015145 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