it.cnr.contab.pdg00.action.StampaVarStanzResAction Maven / Gradle / Ivy
/*
* Copyright (C) 2019 Consiglio Nazionale delle Ricerche
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
/*
* Created on Oct 19, 2005
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package it.cnr.contab.pdg00.action;
import it.cnr.contab.pdg00.bulk.Pdg_variazioneBulk;
import it.cnr.contab.pdg00.bulk.Stampa_var_stanz_resBulk;
import it.cnr.contab.pdg00.bulk.Var_stanz_resBulk;
import it.cnr.contab.reports.action.ParametricPrintAction;
import it.cnr.contab.reports.bp.OfflineReportPrintBP;
import it.cnr.contab.reports.bp.ParametricPrintBP;
import it.cnr.contab.reports.bp.PrintSpoolerBP;
import it.cnr.jada.action.ActionContext;
import it.cnr.jada.action.Forward;
public class StampaVarStanzResAction extends ParametricPrintAction {
public Forward doPrint(ActionContext context) {
ParametricPrintBP bp = (ParametricPrintBP)context.getBusinessProcess();
Forward forward = super.doPrint(context);
if (context.getBusinessProcess() instanceof OfflineReportPrintBP){
OfflineReportPrintBP printbp = (OfflineReportPrintBP)context.getBusinessProcess();
Stampa_var_stanz_resBulk pbulk = (Stampa_var_stanz_resBulk) bp.getModel();
Var_stanz_resBulk bulk = pbulk.getVariazioneForPrint();
// impostazone dell'ufficio di competenza della stampa, utile all'invio della PEC
printbp.initCdServizioPEC(PrintSpoolerBP.PEC_BILANCIO);
// impostazone della descrizione del documento, utile all'invio della PEC
String ds = ("Variazione allo Stanziamento Residuo "+bulk.getEsercizio()+"/"+bulk.getCd_centro_responsabilita()+"/"+bulk.getPg_variazione()+", "+bulk.getDs_variazione());
if (ds.length()>400)
ds=ds.substring(0, 399);
printbp.initDsOggettoPEC(ds);
printbp.initDsNumregPEC(bulk.getPg_variazione()+"-"+bulk.getEsercizio());
}
return forward;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy