Scarichi manuali da WINGEST
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240418103617 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
createSetup("w_ddocu_rc", "LOAD_ORD", "SCARICHI_MANUALI", "N", "Se impostato a S allora nel caricare un documento di scarico da ordine di lavorazione la quantità riportata in testata non è quella dell'ordine ma la differenza tra quella dell'ordine e la somma degli della quantità di testata degl scarichi dell'ordine (Se impostato a S parte un DW differente in F5 su data e numero ordine)", false, null, false, false, false, false, false, null, false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240418105556 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
createOrUpdateView("lvw_qta_prod_scar_ord", "CREATE view lvw_qta_prod_scar_ord as\n" +
|
||||
" select dtb_doct.gestione, \n" +
|
||||
" dtb_doct.data_ord, \n" +
|
||||
" dtb_doct.num_ord, \n" +
|
||||
" dtb_ordt.qta_prod - sum(dtb_doct.qta_prod) as qta_prod_scar\n" +
|
||||
" from dtb_doct inner join dtb_tipi on dtb_doct.cod_dtip = dtb_tipi.cod_dtip \n" +
|
||||
" inner join dtb_ordt on dtb_doct.gestione = dtb_ordt.gestione and\n" +
|
||||
" dtb_doct.data_ord = dtb_ordt.data_ord and\n" +
|
||||
" dtb_doct.num_ord = dtb_ordt.num_ord\n" +
|
||||
" where dtb_doct.gestione = 'L' and\n" +
|
||||
" dtb_tipi.tipo_emissione = 'DIRETTA' and\n" +
|
||||
" dtb_tipi.segno_qta_scar = 1 and\n" +
|
||||
" dtb_doct.data_doc > dateadd(month, -18, getdate()) and\n" +
|
||||
" dtb_doct.data_ord is not null and\n" +
|
||||
" dtb_doct.num_ord is not null and\n" +
|
||||
" dtb_ordt.flag_evaso_forzato = 'N' and\n" +
|
||||
" dtb_ordt.flag_annulla = 'N' and\n" +
|
||||
" dtb_ordt.flag_sospeso = 'N'\n" +
|
||||
" group by dtb_doct.gestione, dtb_doct.data_ord, dtb_doct.num_ord,dtb_ordt.qta_prod");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240418110316 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (!isCustomerDb(
|
||||
IntegryCustomerDB.Maggio_MaggioSrl))
|
||||
return;
|
||||
|
||||
createSetup("w_ddocu_rc", "LOAD_ORD", "SCARICHI_MANUALI", "S", "Se impostato a S allora nel caricare un documento di scarico da ordine di lavorazione la quantità riportata in testata non è quella dell'ordine ma la differenza tra quella dell'ordine e la somma degli della quantità di testata degl scarichi dell'ordine (Se impostato a S parte un DW differente in F5 su data e numero ordine)", false, null, false, false, false, false, false, null, false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user