Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -233,6 +233,7 @@ public class GiacenzaService {
|
||||
" mtb_movi.qta_car AS qta_car,\n" +
|
||||
" mtb_movi.qta_scar AS qta_scar,\n" +
|
||||
" dtb_doct.data_ins,\n" +
|
||||
" case when mtb_movi.qta_car > 0 THEN mtb_movi.data_reg ELSE null END as data_car,\n" +
|
||||
" case when mtb_movi.qta_car > 0 THEN 'D' ELSE null END as tipo_car\n" +
|
||||
" FROM mtb_movi\n" +
|
||||
" INNER JOIN dtb_doct ON dtb_doct.cod_anag = mtb_movi.cod_anag AND\n" +
|
||||
@@ -248,6 +249,7 @@ public class GiacenzaService {
|
||||
" 0,\n" +
|
||||
" ntb_docr.qta_doc * ntb_docr.qta_cnf,\n" +
|
||||
" ntb_doct.data_doc as data_import,\n" +
|
||||
" null as data_car,\n" +
|
||||
" null as tipo_car\n" +
|
||||
" FROM ntb_doct\n" +
|
||||
" INNER JOIN ntb_docr ON ntb_doct.cod_mdep = ntb_docr.cod_mdep AND\n" +
|
||||
@@ -269,7 +271,8 @@ public class GiacenzaService {
|
||||
" IsNull(giac.qta_iniz, 0) as qta_iniz,\n" +
|
||||
" isNull(SUM(movimenti.qta_car * art.qta_std) , 0) + IsNull(giac.qta_iniz, 0) as qta_car,\n" +
|
||||
" isNull(SUM(movimenti.qta_scar * art.qta_std), 0) as qta_scar,\n" +
|
||||
" getdate() as data_ins\n" +
|
||||
" getdate() as data_ins,\n" +
|
||||
" min(COALESCE(giac.data_reg, movimenti.data_car, getdate())) as data_reg\n" +
|
||||
"FROM movimenti\n" +
|
||||
" INNER JOIN art ON movimenti.cod_mart = art.cod_mart\n" +
|
||||
" LEFT OUTER JOIN carelli_giacenza_prog giac ON giac.cod_mdep = movimenti.cod_mdep AND giac.cod_mart = art.cod_mart_mov\n" +
|
||||
|
||||
Reference in New Issue
Block a user