Elaborazione SCRIPTS\run_costicommessa_sav.sql iniziata in data/ora 2023-03-10 / 14.08.39 Elaborazione SCRIPTS\run_costicommessa_sav.sql interrotta in data/ora 2023-03-10 / 14.09.07 ERRORE - Elaborazione interrotta: verificare righe ERROR -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- 2023-03-10 14:08:41 INFO =================== Log started =================== 2023-03-10 14:08:41 INFO Using configdir: S:\AdApta_i68\..\sql-workbench\config 2023-03-10 14:08:41 WARN Using -varDef is deprecated. Please use -variable or -varFile instead 2023-03-10 14:08:41 INFO Setting default locale to: en 2023-03-10 14:08:41 INFO Variable definition loaded from C:\TEMP\run_costicommessa.txt 2023-03-10 14:08:41 INFO Starting SQL Workbench/J, Build 129 (2022-10-23 13:16) in Batch mode 2023-03-10 14:08:41 INFO Java version=14.0.2, java.home=S:\sql-workbench\jre11, vendor=AdoptOpenJDK, name=OpenJDK 64-Bit Server VM 2023-03-10 14:08:41 INFO Operating System=Windows Server 2019, version=10.0, platform=amd64 2023-03-10 14:08:41 INFO Available memory: 2048MB 2023-03-10 14:08:41 INFO Classpath: ..\sql-workbench\sqlworkbench.jar;..\sql-workbench\ext\commons-codec.jar;..\sql-workbench\ext\commons-collections4.jar;..\sql-workbench\ext\commons-compress.jar;..\sql-workbench\ext\commons-io.jar;..\sql-workbench\ext\commons-math3.jar;..\sql-workbench\ext\dbunit.jar;..\sql-workbench\ext\flatlaf.jar;..\sql-workbench\ext\jna-platform.jar;..\sql-workbench\ext\jna.jar;..\sql-workbench\ext\jsch.jar;..\sql-workbench\ext\log4j-api.jar;..\sql-workbench\ext\odfdom-java.jar;..\sql-workbench\ext\poi-ooxml-lite.jar;..\sql-workbench\ext\poi-ooxml.jar;..\sql-workbench\ext\poi.jar;..\sql-workbench\ext\resolver.jar;..\sql-workbench\ext\serializer.jar;..\sql-workbench\ext\simple-odf.jar;..\sql-workbench\ext\slf4j-api.jar;..\sql-workbench\ext\SparseBitSet.jar;..\sql-workbench\ext\xercesImpl.jar;..\sql-workbench\ext\xml-apis.jar;..\sql-workbench\ext\xmlbeans.jar 2023-03-10 14:08:41 INFO Found 0 commands in 0ms 2023-03-10 14:08:41 INFO Loaded 2 connection profiles from S:\SQL-Workbench\Config\WbProfiles.xml 2023-03-10 14:08:41 INFO 2 profiles loaded in 146ms from 1 files 2023-03-10 14:08:41 INFO POI version: 5.2.1 available 2023-03-10 14:08:42 INFO Creating new connection for "{Profili}/OMV": [user=informix, url=jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/, driverClass=com.informix.jdbc.IfxDriver, driverName=Informix] 2023-03-10 14:08:42 INFO Using libdir: S:\SQL-Workbench\Driver 2023-03-10 14:08:42 INFO Changed invalid sample URL in driver "Oracle/XML" from: jdbc:oracle:thin://@hostname:port/service_name to: jdbc:oracle:thin:@//hostname:port/service_name 2023-03-10 14:08:42 INFO Adding ClassLoader URL=file:/S:/SQL-Workbench/Driver/ifxjdbc.jar 2023-03-10 14:08:42 INFO Adding ClassLoader URL=file:/S:/SQL-Workbench/Driver/bson-3.8.0.jar 2023-03-10 14:08:42 INFO BatchRunner: Using DBID=informix_dynamic_server 2023-03-10 14:08:42 INFO BatchRunner: Using identifier quote character: " 2023-03-10 14:08:42 INFO BatchRunner: Using search string escape character: \ 2023-03-10 14:08:42 INFO BatchRunner: Table types returned by the JDBC driver: [SYSTEM TABLE, TABLE, VIEW] 2023-03-10 14:08:42 INFO BatchRunner: Using catalog separator: : 2023-03-10 14:08:42 INFO Connected to: [Informix Dynamic Server], Database version info: [12.10.FC7E], Database version number: [12.10], Driver version: [4.50.JC2], JDBC version: [4.2], ID: [BatchRunner] 2023-03-10 14:08:42 INFO Connection to "User=informix, Database=omv, URL=jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/" successful 2023-03-10 14:08:42 WARN Connection returned warnings: Database has transactions Database selected 2023-03-10 14:08:42 INFO Processing file: S:\AdApta_i68\SCRIPTS\run_costicommessa_sav.sql 2023-03-10 14:08:42 INFO WbRunResult initialized. The result of the next statement will be run as a script 2023-03-10 14:08:42 INFO Processing file: S:\AdApta_i68\SCRIPTS\costiCommessa.sql 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) /* --Parametri wbvardef commessa=421335 -- Commessa da analizzare ; wbvardef dtelab=28/02/2023 -- Data analisi ; --Output totali select dtelab, comm, 'R' ord, cls, sum(costo) from t_costicom where comm = 'B220005' and dtelab = '31/12/2022' and liv = 0 and tpcls = 0 group by 1,2,3,4 union all select dtelab, comm, 'T', 'TOT' cls, sum(costo) from t_costicom where comm = 'B220005' and dtelab = '31/12/2022' and liv = 0 and tpcls = 0 group by 1,2,3,4 order by 1,2,3 desc,4 ; */ WbSetProp workbench.sql.log.statements=true (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) set autocommit on (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) set isolation to dirty read (16ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbecho commessa=B220005 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbecho dtelab = 31/12/2022 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) /* Da verificare: . costi generici (ora articoli non a giacenza ma prelevati da ODL) Mancano (se servissero): . costo figli non in LDP (leggere solo costimag) . costo fasi non rilevate (leggere da mpfaseol in nvl) --Parametri wbvardef commessa=421335 -- Commessa da analizzare ; wbvardef dtelab=28/02/2023 -- Data analisi ; */ --Configurazione wbvardef tipocosto=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_TIPOCOSTO'" (15ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef tipocostohh=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_TIPOCOSTOHH'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef val_acqcomm=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_VALACQCOMM'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef vocegen=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_VOCEGEN'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef voceext=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_VOCEEXT'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef voceffp=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_VOCEFFP'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef tariffahhodl=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_TARIFFAHHOL'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef tariffahhgen=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_TARIFFAHHGE'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef vocetot=@"select mpp_voct from mpparam" (16ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef base_tempi=@"select case when mpp_bast = 'M' then 60 else 1 end from mpparam" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef frazione_tempi=@"select case when mpp_ntem = 'C' then 100 else 60 end from mpparam" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) --Estrazione di tutti i movimenti di magazzino associati alla commessa /* wbexport -type=xlsx -file=$[path]\$[filename].xlsx -title=movimenti -fixedDigits=2 ; select '31/12/2022' dtelab, nvl(gim_comm,blt_comm) comm, gim_sotc sotc, nvl(gim_tord,blt_tord) tord, nvl(gim_nord, blt_nord) nord, gim_data data, gim_code nrmov, gim_riga riga, blt_fc-blt_fs cs, gim_arti arti, amg_dest descrizione, blt_tipo caus, blt_cocl fornitore, des_clifor denominazione, gim_qmov qta, gim_preu preu, case when blt_fcof = 'F' then (UVL(gim_qmov)) * NVL(gim_preu,0) * Zvl(gim_qext) / Uvl(gim_qmov) * UVL(blt_cambe) / UVL(blt_camb) * (100 - NVL(gim_sco1,0)) / 100 * (100 - NVL(gim_sco2,0)) / 100 * (100 - NVL(gim_sco3,0)) / 100 else gim_qmov*gim_preu end imprig from mggior, bfbolt, outer agclifor, mgcausa, mganag where gim_code = blt_code and blt_tipo = cmg_code and gim_arti = amg_code and blt_cocl = cod_clifor --and amg_tcom = 'P' and gim_comm = 'B220005' and gim_data <= '31/12/2022' and gim_depo = 1 --and nvl(amg_fagi ,'S') = 'S' ; */ /* drop table tmp_costiodlmat ; select gim_comm comm, gim_sotc sotc, gim_nord odl, gim_rord riga, gim_arti arti, amg_vcma voce, blt_tipo caus, gim_qmov qta, gim_qmov * nvl((select nvl(tc.cod_vali,0) + nvl(tc.cod_vald,0) from mpcosdat tc where tc.cod_arti = amg_code and tc.cod_arti = amg_code and tc.cod_tipo = 'MED ' and tc.cod_voce = amg_vcma and tc.cod_depo = amg_depp and tc.cod_fap = amg_tipo and tc.cod_data = (select max(tc2.cod_data) from mpcosdat tc2 where tc2.cod_arti = tc.cod_arti and tc2.cod_tipo = 'MED ' and tc2.cod_voce = amg_vcma and tc2.cod_depo = amg_depp and tc2.cod_fap = amg_tipo and tc2.cod_data <= last_day(gim_data)) ), (select coa_vald+coa_vali from mpcosti where coa_arti = amg_code and coa_depo = amg_depp and coa_fap = amg_tipo and coa_tipo = 'MED ' and coa_voce = amg_vcma)) costo from mggior, bfbolt, mgcausa, mganag where gim_code = blt_code and blt_tipo = cmg_code and gim_arti = amg_code --and amg_tcom = 'P' --and nvl(amg_fagi ,'S') = 'S' and gim_comm = 'B220005' and gim_data <= '31/12/2022' and gim_depo = 1 and gim_nord is not null and gim_tord is null and blt_fs = 1 and cmg_fcof = 'P' into temp tmp_costiodlmat ; --Estrazione costo materiali per odl wbexport -type=xlsx -file=$[path]\$[filename].xlsx -title=costomateriali_odl -fixedDigits=2 -append=true ; select odl, mol_parte articolo, amg_dest descrizione, mol_stato stato, voce, sum(qta) qta, sum(costo) costo from tmp_costiodlmat, mpordil, mganag where odl = mol_code and mol_parte = amg_code group by 1,2,3,4,5 order by 1,2,4,5 ; */ drop table t_costimat0 (15ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) select gim_comm comm, gim_sotc sotc, gim_arti arti, '99 ' voce, amg_llcd llcd, amg_tipo ap, nvl((select nvl(tc.cod_vali,0) + nvl(tc.cod_vald,0) from mpcosdat tc where tc.cod_arti = amg_code and tc.cod_arti = amg_code and tc.cod_tipo = 'MED ' and tc.cod_voce = '99 ' and tc.cod_depo = amg_depp and tc.cod_fap = amg_tipo and tc.cod_data = (select max(tc2.cod_data) from mpcosdat tc2 where tc2.cod_arti = tc.cod_arti and tc2.cod_tipo = 'MED ' and tc2.cod_voce = '99 ' and tc2.cod_depo = amg_depp and tc2.cod_fap = amg_tipo and tc2.cod_data <= last_day(gim_data)) ), (select coa_vald+coa_vali from mpcosti where coa_arti = amg_code and coa_depo = amg_depp and coa_fap = amg_tipo and coa_tipo = 'MED ' and coa_voce = '99 ')) costomag, (select sum(ofc_preu*ofc_qext)/sum(ofc_qord) from ofordic, ofordit, oftipord where ofc_tipo = oft_tipo and ofc_code = oft_code and oft_tofo = oto_code --and nvl(oto_tipo,'.') <> 'E'-- and not (oft_stat = 'C' and ofc_qcon = 0) and ofc_arti = gim_arti and ofc_comm = 'B220005') acqcomm, /* case when blt_fcof = 'F' then NVL(gim_preu,0) * Zvl(gim_qext) / Uvl(gim_qmov) * UVL(blt_cambe) / UVL(blt_camb) * (100 - NVL(gim_sco1,0)) / 100 * (100 - NVL(gim_sco2,0)) / 100 * (100 - NVL(gim_sco3,0)) / 100 else gim_preu end acqcomm, */ -- sum(case when (blt_fcof = 'P' or cmg_fter = 'S') and blt_fs = 1 then gim_qmov else 0 end) kpre, -- sum(case when (blt_fcof = 'P' or cmg_fter = 'S') and blt_fc = 1 then gim_qmov else 0 end) kver, sum(case when (blt_fcof = 'P' or cmg_fter = 'S') and blt_fs = 1 then gim_qmov else 0 end) kpre, sum(case when (blt_fcof = 'P' or cmg_fter = 'S') and blt_fc = 1 then gim_qmov else 0 end) kver, sum(gim_qmov * blt_fs) ksca, sum(gim_qmov * blt_fc) kcar, --sum(gim_qmov * (blt_fc-blt_fs)) kgia, max(cmg_fter) fter from mggior, bfbolt, mgcausa, mganag where gim_code = blt_code and blt_tipo = cmg_code and gim_arti = amg_code --and amg_tcom = 'P' --and nvl(amg_fagi ,'S') = 'S' and gim_comm = 'B220005' and gim_data <= '31/12/2022' ----------------------------------------and nvl(cmg_fter,'N') <> 'S' ----and gim_depo = 1 group by 1,2,3,4,5,6,7,8 into temp t_costimat0 (16ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) /* update t_costimat0 set costomag = 0, acqcomm = 0 where fter = 'S' ; update t_costimat0 set kgia = 0 where kgia < 0 ; */ update t_costimat0 set acqcomm = costomag where 'S ' <> 'S' and ap = 'A' (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) /* update t_costimat0 set costomag = 0 where 'S ' <> 'S' and ap = 'A' ; */ delete from t_costimat where dtelab = '31/12/2022' and comm = 'B220005' (16ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costimat select '31/12/2022' dtelab, *, /* case when ksca >= kcar then kcar else 0 end kcomm, case when ksca > kcar then (ksca-kcar) else 0 end kart, */ /* case when kpre > kver then (kpre-kver) else 0 end kcomm, 0 kart, */ case when kpre > kver and kpre-kver >= kcar then kcar when kpre > kver and kpre-kver < kcar then kpre-kver else 0 end kcomm, case when kpre > kver and kpre-kver >= kcar then kpre-kver-kcar when kpre > kver and kpre-kver < kcar then 0 else 0 end kart, case when ksca < kcar then (kcar-ksca) else 0 end kgiac, 0,0,0 from t_costimat0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) --Estrazione costo materiali per articolo update t_costimat set val_comm = kcomm*nvl(acqcomm,0), val_art = kart*nvl(costomag,0), val_giac = kgiac*nvl(case when ap = 'A' then acqcomm else costomag end,0) where dtelab = '31/12/2022' and comm = 'B220005' (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) delete from t_costicom where dtelab = '31/12/2022' and comm = 'B220005' (15ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, null::char, voce, llcd, 'MAK' voce, 0, 0, kcomm, val_comm, kcomm from t_costimat where nvl(val_comm,0) <> 0 and dtelab = '31/12/2022' and comm = 'B220005' (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, null::char, voce, llcd, 'MAG' voce, 0, 0, kart, val_art, kart from t_costimat where nvl(val_art,0) <> 0 and dtelab = '31/12/2022' and comm = 'B220005' (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, null::char, voce, llcd, 'GIA' voce, 1, 0, kgiac, val_giac, kgiac from t_costimat where nvl(val_giac,0) <> 0 and dtelab = '31/12/2022' and comm = 'B220005' (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', nvl(ofc_comm,oft_comm), ofc_sotc, ofc_arti, null::char, nvl('99 ','10 ') voce, nvl(amg_llcd,0) llcd, 'ORF' voce, 2, 0, UVL(ofc_qord-ofc_qcon), (UVL(ofc_qord-ofc_qcon)) * NVL(ofc_preu,0) * Zvl(ofc_qext) / Uvl(ofc_qord) * UVL(oft_cambe) / UVL(oft_camb) * (100 - NVL(ofc_scon,0)) / 100 * (100 - NVL(ofc_sco2,0)) / 100 * (100 - NVL(ofc_sco3,0)) / 100, UVL(ofc_qord-ofc_qcon) from ofordic, ofordit, outer mganag where ofc_tipo = oft_tipo and ofc_code = oft_code and ofc_arti = amg_code and nvl(ofc_comm,oft_comm) = 'B220005' and ofc_feva = 'N' (31ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) delete from t_costiext where dtelab = '31/12/2022' and comm = 'B220005' (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) --C/L di prodotto insert into t_costiext select '31/12/2022', nvl(gim_comm,blt_comm) comm, gim_sotc sotc, gim_arti arti, 'CLP' tcl, (select min(cce_voca) from mpcicli, mpcencos where mci_parte = amg_code and mci_code = amg_crif and mci_tipo = 'E' and mci_centro = cce_cent and blt_data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'MED ') voce, amg_llcd llcd, nvl(gim_nord, blt_nord) nord, gim_rord rord, gim_data data, gim_code id, gim_riga riga, blt_cocl clifor, blt_fc-blt_fs cs, blt_tipo caus, gim_qmov qta, nvl(gim_prlav,gim_preu) gim_preu, nvl(gim_prlav,gim_preu)*gim_qmov imprig from mggior, bfbolt, mgcausa, mganag, outer agclifor where gim_code = blt_code and blt_tipo = cmg_code and gim_arti = amg_code and blt_cocl = cod_clifor --and amg_tcom = 'P' and gim_comm = 'B220005' and gim_data <= '31/12/2022' --and nvl(amg_fagi ,'S') = 'S' and cmg_casc = 'C' and nvl(cmg_fter,'N') <> 'N' and gim_rord is not null and gim_depo = 1 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) --C/L di fase insert into t_costiext select '31/12/2022', nvl(gim_comm,blt_comm) comm, gim_sotc, gim_arti arti, 'CLF' tcl, (select cce_voca from mpcicli, mpcencos where mci_parte = amg_code and mci_code = amg_crif and mci_tipo = 'E' and mci_sequ = gim_rord and mci_centro = cce_cent and blt_data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'MED ') voce, amg_llcd llcd, nvl(gim_nord, blt_nord) nord, gim_rord, gim_data, gim_code, gim_riga, blt_cocl clifor, blt_fc-blt_fs cs, blt_tipo, gim_qmov, nvl(gim_prlav,gim_preu) gim_preu, nvl(gim_prlav,gim_preu)*gim_qmov imprig from mggior, bfbolt, mgcausa, mganag, outer agclifor where gim_code = blt_code and blt_tipo = cmg_code and gim_arti = amg_code and blt_cocl = cod_clifor --and amg_tcom = 'P' and gim_comm = 'B220005' and gim_data <= '31/12/2022' --and nvl(amg_fagi ,'S') = 'S' and cmg_casc = 'C' and nvl(cmg_fter,'N') <> 'N' and gim_rord is null and gim_depo = 1 (16ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) --Estrazione costo terzisti per articolo insert into t_costicom select '31/12/2022', comm, sotc, arti, clifor, nvl(voce,'30 '), llcd, tcl /*'EXT'*/, 0, 0, sum(qta), sum(imprig), sum(qta) from t_costiext where dtelab = '31/12/2022' and comm = 'B220005' group by 1,2,3,4,5,6,7,8 having sum(imprig) <> 0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', gim_comm, gim_sotc, gim_arti, null::char, '10 ', 99, 'GEN', 0, 0, sum(gim_qmov), sum(gim_qmov*(blt_fc-blt_fs)*gim_preu) imprig, sum(gim_qmov) from mggior, bfbolt, mgcausa where gim_code = blt_code and blt_tipo = cmg_code --and (gim_arti is null or gim_arti in (select amg_code from mganag where nvl(amg_fagi ,'S') = 'N')) and gim_arti is null and gim_comm = 'B220005' and gim_data <= '31/12/2022' group by 1,2,3,4,5 having sum(gim_qmov*(blt_fc-blt_fs)*gim_preu) <> 0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) --Estrazione fatture passive (no articolo o no a giacenza) /* wbexport -type=xlsx -file=$[path]\$[filename].xlsx -title=fatture_passive -fixedDigits=2 -append=true ; select ffc_sotc sotto_commessa, trim(fft_regi)||'/'||fft_anno||'/'||fft_prot documento, ffc_arti arti, amg_dest descrizione, sum(ffc_qext) qta, sum(sgn*ffc_qext*ffc_preu*(100-ffc_scon)/100*(100-ffc_sco2)/100*(100-ffc_sco3)/100) importo from ( select ffc_comm, ffc_sotc, ffc_sotc, fft_regi,fft_anno,fft_numf,fft_cofo,ffc_arti,nvl(amg_fagi,'s') fagi, nvl(ffc_des1,amg_dest) amg_dest, ffc_nord,ffc_tord,ffc_rord,ffc_nbol,ffc_rbol, uvl(ffc_qext) ffc_qext,zvl(ffc_preu) ffc_preu,zvl(ffc_scon) ffc_scon,zvl(ffc_sco2) ffc_sco2, zvl(ffc_sco3) ffc_sco3,fft_datf,fft_valu,uvl(fft_camb),uvl(fft_cambe), fft_prot, case when fft_tmov = 'N' then -1 else 1 end sgn from mgfafoc, mgfafot,outer mganag where ffc_comm = 'B220005' and fft_dtreg <= '31/12/2022' and ffc_code = fft_code and ffc_arti = amg_code ) where ffc_arti is null or fagi = 'N' group by 1,2,3,4 order by 1,2,3 ; */ insert into t_costicom select '31/12/2022', ffc_comm, ffc_sotc, ffc_arti, null::char, '40 ', 99, 'FFP', 0, 0, sum(sgn*ffc_qext), sum(sgn*ffc_qext*ffc_preu*(100-ffc_scon)/100*(100-ffc_sco2)/100*(100-ffc_sco3)/100) imprig, sum(sgn*ffc_qext) from ( select ffc_comm, ffc_sotc, fft_regi,fft_anno,fft_numf,fft_cofo,ffc_arti,nvl(amg_fagi,'s') fagi,ffc_des1,ffc_umif, ffc_nord,ffc_tord,ffc_rord,ffc_nbol,ffc_rbol, uvl(ffc_qext) ffc_qext,zvl(ffc_preu) ffc_preu,zvl(ffc_scon) ffc_scon,zvl(ffc_sco2) ffc_sco2, zvl(ffc_sco3) ffc_sco3,fft_datf,fft_valu,uvl(fft_camb),uvl(fft_cambe), fft_prot, case when fft_tmov = 'N' then -1 else 1 end sgn from mgfafoc, mgfafot,outer mganag where ffc_comm = 'B220005' and fft_dtreg <= '31/12/2022' and ffc_code = fft_code and ffc_arti = amg_code and ffc_nbol is null ) where ffc_arti is null or fagi = 'N' group by 1,2,3,4 (46ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) delete from t_tempilav where dtelab = '31/12/2022' and comm = 'B220005' (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) --Tempi setup insert into t_tempilav select '31/12/2022', mol_comm comm, mol_sotc sotc, mvt_ordl odl, mvt_data data, 'HST' tipo, mol_parte arti, amg_llcd llcd, mvt_cent cdl, mol_quari qta, (mvt_etah+mvt_etam/60)/1 hh, mce_cset tariffa from mpordil, mptemfas, mganag, mpcentri where mol_code = mvt_ordl and mvt_cent = mce_code and mol_parte = amg_code and mol_comm = 'B220005' and mvt_data <= '31/12/2022' and (mvt_etah > 0 or mvt_etam > 0) (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) --Tempi manodopera insert into t_tempilav select '31/12/2022', mol_comm comm, mol_sotc, mvt_ordl, mvt_data, 'HMO' tipo, mol_parte arti, amg_llcd llcd, mvt_cent cdl, mol_quari, (mvt_etuh+mvt_etum/60)/1 hh, mce_cman tariffa from mpordil, mptemfas, mganag, mpcentri where mol_code = mvt_ordl and mvt_cent = mce_code and mol_parte = amg_code and mol_comm = 'B220005' and mvt_data <= '31/12/2022' and (mvt_etuh > 0 or mvt_etum > 0) (16ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) --Tempi lavorazione insert into t_tempilav select '31/12/2022', mol_comm comm, mol_sotc, mvt_ordl, mvt_data, 'HMC' tipo, mol_parte arti, amg_llcd llcd, mvt_cent cdl, mol_quari, (mvt_etmh+mvt_etmm/60)/1 hh, mce_cmac tariffa from mpordil, mptemfas, mganag, mpcentri where mol_code = mvt_ordl and mvt_cent = mce_code and mol_parte = amg_code and mol_comm = 'B220005' and mvt_data <= '31/12/2022' and mvt_etmh > 0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) --Tempi generici su ODL (mptempi) insert into t_tempilav select '31/12/2022', mtf_comm, mtf_sotc, mtf_ordl, mtf_data, 'HOL', null::char, 99, mtf_cent cdl, 0, (mtf_hhto+mtf_mmto/60)/1 hh, 'A ' tariffa from mptempi, mpcentri where mtf_cent = mce_code and mtf_comm = 'B220005' and mtf_data <= '31/12/2022' and mtf_ordl is not null and (mtf_hhto > 0 or mtf_mmto > 0) (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) --Tempi generici su commessa (mptempi) insert into t_tempilav select '31/12/2022', mtf_comm, mtf_sotc, null::integer, mtf_data, 'HGE', null::char, 99, mtf_cent cdl, 0, (mtf_hhto+mtf_mmto/60)/1, 'A ' tariffa from mptempi, mpcentri where mtf_cent = mce_code and mtf_comm = 'B220005' and mtf_data <= '31/12/2022' and mtf_ordl is null and (mtf_hhto > 0 or mtf_mmto > 0) (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, cdl, cce_voca, llcd, tipo, 0, 0 liv, --(select sum(mol_quari) from mpordil where mol_comm = 'B220005'), sum(hh*cce_cooa) sum(hh), sum(hh*cce_cooa), (select sum(mol_quari) from mpordil where mol_code = odl) from t_tempilav, mpcencos where cdl = cce_cent and dtelab = '31/12/2022' and comm = 'B220005' and data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'STD ' and tariffa like '%A%' group by 1,2,3,4,5,6,7,8,9,10,13 having sum(hh*cce_cooa) <> 0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, cdl, cce_voca, llcd, tipo, 0, 0 liv, --(select sum(mol_quari) from mpordil where mol_comm = 'B220005'), sum(hh*cce_coob) sum(hh), sum(hh*cce_coob), (select sum(mol_quari) from mpordil where mol_code = odl) from t_tempilav, mpcencos where cdl = cce_cent and dtelab = '31/12/2022' and comm = 'B220005' and data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'STD ' and tariffa like '%B%' group by 1,2,3,4,5,6,7,8,9,10,13 having sum(hh*cce_coob) <> 0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, cdl, cce_voca, llcd, tipo, 0, 0 liv, --(select sum(mol_quari) from mpordil where mol_comm = 'B220005'), sum(hh*cce_cooc) sum(hh), sum(hh*cce_cooc), (select sum(mol_quari) from mpordil where mol_code = odl) from t_tempilav, mpcencos where cdl = cce_cent and dtelab = '31/12/2022' and comm = 'B220005' and data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'STD ' and tariffa like '%C%' group by 1,2,3,4,5,6,7,8,9,10,13 having sum(hh*cce_cooc) <> 0 (16ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, cdl, cce_voca, llcd, tipo, 0, 0 liv, --(select sum(mol_quari) from mpordil where mol_comm = 'B220005'), sum(hh*cce_cood) sum(hh), sum(hh*cce_cood), (select sum(mol_quari) from mpordil where mol_code = odl) from t_tempilav, mpcencos where cdl = cce_cent and dtelab = '31/12/2022' and comm = 'B220005' and data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'STD ' and tariffa like '%D%' group by 1,2,3,4,5,6,7,8,9,10,13 having sum(hh*cce_cood) <> 0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, cdl, cce_voca, llcd, tipo, 0, 0 liv, --(select sum(mol_quari) from mpordil where mol_comm = 'B220005'), sum(hh*cce_cooe) sum(hh), sum(hh*cce_cooe), (select sum(mol_quari) from mpordil where mol_code = odl) from t_tempilav, mpcencos where cdl = cce_cent and dtelab = '31/12/2022' and comm = 'B220005' and data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'STD ' and tariffa like '%E%' group by 1,2,3,4,5,6,7,8,9,10,13 having sum(hh*cce_cooe) <> 0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, cdl, cce_voca, llcd, tipo, 0, 0 liv, --(select sum(mol_quari) from mpordil where mol_comm = 'B220005'), sum(hh*cce_coof) sum(hh), sum(hh*cce_coof), (select sum(mol_quari) from mpordil where mol_code = odl) from t_tempilav, mpcencos where cdl = cce_cent and dtelab = '31/12/2022' and comm = 'B220005' and data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'STD ' and tariffa like '%F%' group by 1,2,3,4,5,6,7,8,9,10,13 having sum(hh*cce_coof) <> 0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, cdl, cce_voca, llcd, tipo, 0, 0 liv, --(select sum(mol_quari) from mpordil where mol_comm = 'B220005'), sum(hh*cce_coog) sum(hh), sum(hh*cce_coog), (select sum(mol_quari) from mpordil where mol_code = odl) from t_tempilav, mpcencos where cdl = cce_cent and dtelab = '31/12/2022' and comm = 'B220005' and data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'STD ' and tariffa like '%G%' group by 1,2,3,4,5,6,7,8,9,10,13 having sum(hh*cce_coog) <> 0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, cdl, cce_voca, llcd, tipo, 0, 0 liv, --(select sum(mol_quari) from mpordil where mol_comm = 'B220005'), sum(hh*cce_cooh) sum(hh), sum(hh*cce_cooh), (select sum(mol_quari) from mpordil where mol_code = odl) from t_tempilav, mpcencos where cdl = cce_cent and dtelab = '31/12/2022' and comm = 'B220005' and data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'STD ' and tariffa like '%H%' group by 1,2,3,4,5,6,7,8,9,10,13 having sum(hh*cce_cooh) <> 0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, cdl, cce_voca, llcd, tipo, 0, 0 liv, --(select sum(mol_quari) from mpordil where mol_comm = 'B220005'), sum(hh*cce_cooi) sum(hh), sum(hh*cce_cooi), (select sum(mol_quari) from mpordil where mol_code = odl) from t_tempilav, mpcencos where cdl = cce_cent and dtelab = '31/12/2022' and comm = 'B220005' and data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'STD ' and tariffa like '%I%' group by 1,2,3,4,5,6,7,8,9,10,13 having sum(hh*cce_cooi) <> 0 (15ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) insert into t_costicom select '31/12/2022', comm, sotc, arti, cdl, cce_voca, llcd, tipo, 0, 0 liv, --(select sum(mol_quari) from mpordil where mol_comm = 'B220005'), sum(hh*cce_cooj) sum(hh), sum(hh*cce_cooj), (select sum(mol_quari) from mpordil where mol_code = odl) from t_tempilav, mpordil, mpcencos where cdl = cce_cent and dtelab = '31/12/2022' and comm = 'B220005' and odl = mol_code and data between nvl(cce_dain,mdy(1,1,1900)) and nvl(cce_dafi,mdy(12,31,2099)) and cce_tcos = 'STD ' and tariffa like '%J%' group by 1,2,3,4,5,6,7,8,9,10,13 having sum(hh*cce_cooj) <> 0 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) /* --Estrazione costi per articolo-voce wbexport -type=xlsx -file=$[path]\$[filename].xlsx -title=costo_articoli_voce -fixedDigits=2 -append=true ; select comm, sotc, nvl(arti,'') arti, nvl(cdl,'') cdl, voce, llcd, cls, tpcls, liv, costo from t_costicom order by 1,2,3,4 ; */ drop table tmp_prellivinf (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) select nvl(gim_comm,blt_comm) comm, gim_sotc sotc, null::char(1) tord, nvl(gim_nord, blt_nord) nord, null::int rord, mol_parte padre, blt_fc-blt_fs cs, gim_arti arti, amg_llcd llcd, blt_tipo caus, gim_qmov qta, 0::dec(14,5) costo_li from mggior, bfbolt, mgcausa, mganag, mpordil where gim_code = blt_code and blt_tipo = cmg_code --and gim_arti = amg_code and mol_parte = amg_code and mol_code = nvl(gim_nord, blt_nord) --and amg_tcom = 'P' and gim_comm = 'B220005' and gim_data <= '31/12/2022' and gim_nord is not null and gim_tord is null --and nvl(amg_fagi ,'S') = 'S' union all select nvl(gim_comm,blt_comm) comm, gim_sotc sotc, ofc_tipo, ofc_code, ofc_riga, ofc_arti padre, blt_fc-blt_fs cs, gim_arti arti, amg_llcd llcd, blt_tipo caus, gim_qmov qta, 0::dec(14,5) costo_li from mggior, bfbolt, mgcausa, mganag, mpfabbi, ofordic where gim_code = blt_code and blt_tipo = cmg_code --and gim_arti = amg_code and gim_rord = mpf_key and mpf_tiof = ofc_tipo and mpf_coof = ofc_code and mpf_riof = ofc_riga and ofc_arti = amg_code --and amg_tcom = 'P' and gim_comm = 'B220005' and gim_data <= '31/12/2022' and gim_nord is not null and gim_tord is not null --and nvl(amg_fagi ,'S') = 'S' into temp tmp_prellivinf (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbinclude costicommessa.sql (281ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef commessa=B220020 (0ms) 2023-03-10 14:08:42 INFO Processing file: S:\AdApta_i68\SCRIPTS\costiCommessa.sql 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) /* --Parametri wbvardef commessa=421335 -- Commessa da analizzare ; wbvardef dtelab=28/02/2023 -- Data analisi ; --Output totali select dtelab, comm, 'R' ord, cls, sum(costo) from t_costicom where comm = 'B220020' and dtelab = '31/12/2022' and liv = 0 and tpcls = 0 group by 1,2,3,4 union all select dtelab, comm, 'T', 'TOT' cls, sum(costo) from t_costicom where comm = 'B220020' and dtelab = '31/12/2022' and liv = 0 and tpcls = 0 group by 1,2,3,4 order by 1,2,3 desc,4 ; */ WbSetProp workbench.sql.log.statements=true (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) set autocommit on (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) set isolation to dirty read (15ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbecho commessa=B220020 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbecho dtelab = 31/12/2022 (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) /* Da verificare: . costi generici (ora articoli non a giacenza ma prelevati da ODL) Mancano (se servissero): . costo figli non in LDP (leggere solo costimag) . costo fasi non rilevate (leggere da mpfaseol in nvl) --Parametri wbvardef commessa=421335 -- Commessa da analizzare ; wbvardef dtelab=28/02/2023 -- Data analisi ; */ --Configurazione wbvardef tipocosto=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_TIPOCOSTO'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef tipocostohh=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_TIPOCOSTOHH'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef val_acqcomm=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_VALACQCOMM'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef vocegen=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_VOCEGEN'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef voceext=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_VOCEEXT'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef voceffp=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_VOCEFFP'" (16ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef tariffahhodl=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_TARIFFAHHOL'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef tariffahhgen=@"select valore from sxparams where cod_azienda = 0 and cod_param = 'CO_TARIFFAHHGE'" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef vocetot=@"select mpp_voct from mpparam" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef base_tempi=@"select case when mpp_bast = 'M' then 60 else 1 end from mpparam" (0ms) 2023-03-10 14:08:42 INFO Executed: (BatchRunner, informix@jdbc:informix-sqli://serp001:3012/omv:INFORMIXSERVER=serp001_ol12;DBDATE=DMY4/) wbvardef frazione_tempi=@"select case when mpp_ntem = 'C' then 100 else 60 end from mpparam" (0ms) 2023-03-10 14:08:42 INFO Disconnecting: [OMV], ID=BatchRunner 2023-03-10 14:09:07 WARN SQL Workbench/J process has been interrupted. 2023-03-10 14:09:07 WARN Aborting process... 2023-03-10 14:09:07 INFO =================== Log stopped ===================