leonardo 2015-04-08 13:52:35 +00:00
parent c89b23ea3c
commit f118407ed0
1 changed files with 24 additions and 5 deletions

View File

@ -13,6 +13,8 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.sql.DataSource;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.Predicate; import org.apache.commons.collections.Predicate;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
@ -308,6 +310,9 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
public static final int INTERVALO_FECHAMENTO_DECENDIAL = 10; public static final int INTERVALO_FECHAMENTO_DECENDIAL = 10;
public static final int INTERVALO_FECHAMENTO_QUINZENAL = 15; public static final int INTERVALO_FECHAMENTO_QUINZENAL = 15;
public static final int INTERVALO_FECHAMENTO_MENSAL = 30; public static final int INTERVALO_FECHAMENTO_MENSAL = 30;
@Autowired
private DataSource dataSource;
public Button getBtnApagar() { public Button getBtnApagar() {
return btnApagar; return btnApagar;
@ -787,14 +792,28 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
public void onClick$btnIntegracao(Event ev) { public void onClick$btnIntegracao(Event ev) {
try { try {
TotvsService.cadastrarTituloAReceber(puntoVenta.getPuntoventaId(), fecInicio.getValue(), fecFinal.getValue(), puntoVentaService.getDBSession()); TotvsService.cadastrarTituloAReceber(puntoVenta.getPuntoventaId(), fecInicio.getValue(), fecFinal.getValue(), dataSource.getConnection());
puntoVentaService.getDBSession().close(); puntoVentaService.getDBSession().close();
} catch (WrongValueException e) { } catch (WrongValueException e) {
// TODO Auto-generated catch block try {
e.printStackTrace(); Messagebox.show(
e.getMessage(),
Labels.getLabel("editarPuntoVentaController.window.title"),
Messagebox.OK, Messagebox.ERROR);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
} catch (Exception e) { } catch (Exception e) {
// TODO Auto-generated catch block try {
e.printStackTrace(); Messagebox.show(
e.getMessage(),
Labels.getLabel("editarPuntoVentaController.window.title"),
Messagebox.OK, Messagebox.ERROR);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
} }
} }