63 lines
2.3 KiB
Java
63 lines
2.3 KiB
Java
|
|
package it.acxent.contab.servlet;
|
||
|
|
|
||
|
|
import it.acxent.anag.Iva;
|
||
|
|
import it.acxent.anag.TipoPagamento;
|
||
|
|
import it.acxent.anag.TipoPagamentoCR;
|
||
|
|
import it.acxent.anag.Users;
|
||
|
|
import it.acxent.anag.Vettore;
|
||
|
|
import it.acxent.contab.Documento;
|
||
|
|
import it.acxent.contab.RigaDocumento;
|
||
|
|
import it.acxent.contab.TipoDocumento;
|
||
|
|
import it.acxent.db.ApplParmFull;
|
||
|
|
import it.acxent.db.DBAdapter;
|
||
|
|
import it.acxent.db.ResParm;
|
||
|
|
import javax.servlet.annotation.WebServlet;
|
||
|
|
import javax.servlet.http.HttpServletRequest;
|
||
|
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
|
||
|
|
@WebServlet(urlPatterns = {"/admin/contab/DocumentoOrd.abl"})
|
||
|
|
public class DocumentoOrdSvlt extends DocumentoSvlt {
|
||
|
|
protected String getBeanPageName(HttpServletRequest req) {
|
||
|
|
return "documento";
|
||
|
|
}
|
||
|
|
|
||
|
|
protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||
|
|
Documento bean = (Documento)beanA;
|
||
|
|
super.fillComboAfterDetail(beanA, req, res);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected ResParm afterSave(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
|
||
|
|
ResParm rp = new ResParm(true);
|
||
|
|
return rp;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected ResParm beforeSearch(HttpServletRequest req, HttpServletResponse res) {
|
||
|
|
req.setAttribute("id_tipoDocumento", String.valueOf(getId_docOrdine()));
|
||
|
|
return new ResParm(true);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
|
||
|
|
ApplParmFull apFull = getApFull(req);
|
||
|
|
req.setAttribute("nf4", getNf4());
|
||
|
|
req.setAttribute("listaOperatori", new Users(apFull)
|
||
|
|
.findUsersByProfileMax(9L));
|
||
|
|
Documento bean = new Documento(apFull);
|
||
|
|
bean.setId_tipoDocumento(getId_docOrdine());
|
||
|
|
bean.setFlgStato(1L);
|
||
|
|
bean.setId_tipoPagamento(1L);
|
||
|
|
req.setAttribute("bean", bean);
|
||
|
|
req.setAttribute("listaTipoPagamento", new TipoPagamento(apFull)
|
||
|
|
.findByCR(new TipoPagamentoCR(), 0, 0));
|
||
|
|
req.setAttribute("listaVettore", new Vettore(apFull).findAll());
|
||
|
|
req.setAttribute("listaTipoDocumento", new TipoDocumento(apFull)
|
||
|
|
.findAll());
|
||
|
|
req.setAttribute("listaIva", new Iva(apFull).findAll());
|
||
|
|
RigaDocumento bean2 = new RigaDocumento(apFull);
|
||
|
|
bean2.setId_iva(getParm("CODICE_IVA_STD_VEND").getNumeroLong());
|
||
|
|
req.setAttribute("bean2", bean2);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected void otherCommands(HttpServletRequest req, HttpServletResponse res) {
|
||
|
|
search(req, res);
|
||
|
|
}
|
||
|
|
}
|