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