parent
83c8076603
commit
40af38c4c9
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ventaboletosadm</artifactId>
|
<artifactId>ventaboletosadm</artifactId>
|
||||||
<version>1.0.43</version>
|
<version>1.0.44</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -34,6 +34,7 @@ import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
import javax.activation.MimetypesFileTypeMap;
|
import javax.activation.MimetypesFileTypeMap;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
import javax.swing.text.MaskFormatter;
|
||||||
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.collections.Predicate;
|
import org.apache.commons.collections.Predicate;
|
||||||
|
@ -200,6 +201,8 @@ import com.rjconsultores.wsag.GeradorTitulosAG;
|
||||||
//import com.rjconsultores.wsag.WSAGLog;
|
//import com.rjconsultores.wsag.WSAGLog;
|
||||||
import com.rjconsultores.wsag.WSAGLog;
|
import com.rjconsultores.wsag.WSAGLog;
|
||||||
|
|
||||||
|
import bsh.ParseException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafius
|
* @author Rafius
|
||||||
|
@ -657,6 +660,9 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inserirItensLista(lsCategoriaBloquear);
|
inserirItensLista(lsCategoriaBloquear);
|
||||||
|
|
||||||
getTxtTaxaConvenienciaPorc().setConstraint(getCt());
|
getTxtTaxaConvenienciaPorc().setConstraint(getCt());
|
||||||
|
@ -712,6 +718,30 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
abrirPtovtaComissao(ptovtaComissao);
|
abrirPtovtaComissao(ptovtaComissao);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
numtelefonodos.addEventListener(Events.ON_CHANGE, new EventListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event event) throws Exception {
|
||||||
|
numtelefonodos.setValue(mascaraTelefone(numtelefonodos.getValue()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
numtelefonouno.addEventListener(Events.ON_CHANGE, new EventListener() {
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event event) throws Exception {
|
||||||
|
numtelefonouno.setValue(mascaraTelefone(numtelefonouno.getValue()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
txtNumFax.addEventListener(Events.ON_CHANGE, new EventListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event event) throws Exception {
|
||||||
|
txtNumFax.setValue(mascaraTelefone(txtNumFax.getValue()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fechamentoParamptovtaList.setItemRenderer(new FechamentoParamptovtaListItemRenderer());
|
fechamentoParamptovtaList.setItemRenderer(new FechamentoParamptovtaListItemRenderer());
|
||||||
|
@ -2080,29 +2110,32 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
puntoVenta.setDateFechamento(dateFechamento.getValue());
|
puntoVenta.setDateFechamento(dateFechamento.getValue());
|
||||||
String getString = null;
|
String getString = null;
|
||||||
|
|
||||||
puntoVenta.setNumfax(null);
|
puntoVenta.setNumfax(null);
|
||||||
if (!txtNumFax.getValue().equals("")) {
|
if (!txtNumFax.getValue().equals("")) {
|
||||||
getString = this.replaceTextbox(txtNumFax);
|
getString = this.replaceTextbox(txtNumFax);
|
||||||
if (getString.length() >= 11) {
|
if (getString.indexOf("_") > 0) {
|
||||||
puntoVenta.setNumfax(txtNumFax.getValue().replace("_", ""));
|
puntoVenta.setNumfax(txtNumFax.getValue().replace("_", ""));
|
||||||
}
|
}else
|
||||||
|
puntoVenta.setNumfax(txtNumFax.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
puntoVenta.setNumtelefonouno(null);
|
puntoVenta.setNumtelefonouno(null);
|
||||||
if (!numtelefonouno.getValue().equals("")) {
|
if (!numtelefonouno.getValue().equals("")) {
|
||||||
getString = this.replaceTextbox(numtelefonouno);
|
getString = this.replaceTextbox(numtelefonouno);
|
||||||
if (getString.length() >= 11) {
|
if (getString.indexOf("_") > 0) {
|
||||||
puntoVenta.setNumtelefonouno(numtelefonouno.getValue().replace("_", ""));
|
puntoVenta.setNumtelefonouno(numtelefonouno.getValue().replace("_", ""));
|
||||||
}
|
}else
|
||||||
|
puntoVenta.setNumtelefonouno(numtelefonouno.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
puntoVenta.setNumtelefonodos(null);
|
puntoVenta.setNumtelefonodos(null);
|
||||||
if (!numtelefonodos.getValue().equals("")) {
|
if (!numtelefonodos.getValue().equals("")) {
|
||||||
getString = this.replaceTextbox(numtelefonodos);
|
getString = this.replaceTextbox(numtelefonodos);
|
||||||
if (getString.length() >= 11) {
|
if (getString.indexOf("_") > 0) {
|
||||||
puntoVenta.setNumtelefonodos(numtelefonodos.getValue().replace("_", ""));
|
puntoVenta.setNumtelefonodos(numtelefonodos.getValue().replace("_", ""));
|
||||||
}
|
}else
|
||||||
|
puntoVenta.setNumtelefonodos(numtelefonodos.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmbBanco.getSelectedItem() == null) {
|
if (cmbBanco.getSelectedItem() == null) {
|
||||||
|
@ -4744,6 +4777,21 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.tabEndereco = tabEndereco;
|
this.tabEndereco = tabEndereco;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String mascaraTelefone(String campo) {
|
||||||
|
campo = formatString(campo,"(###)####-####");
|
||||||
|
return campo;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String formatString(String value, String pattern) {
|
||||||
|
MaskFormatter mf;
|
||||||
|
try {
|
||||||
|
mf = new MaskFormatter(pattern);
|
||||||
|
mf.setValueContainsLiteralCharacters(false);
|
||||||
|
return mf.valueToString(value);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -266,7 +266,7 @@
|
||||||
<label
|
<label
|
||||||
value="${c:l('editarPuntoVentaController.lbTelefonoUno.value')}" />
|
value="${c:l('editarPuntoVentaController.lbTelefonoUno.value')}" />
|
||||||
<textbox id="numtelefonouno"
|
<textbox id="numtelefonouno"
|
||||||
constraint="no zero" width="70%" maxlength="40"
|
constraint="no zero" width="70%" maxlength="15"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
|
@ -274,7 +274,7 @@
|
||||||
<label
|
<label
|
||||||
value="${c:l('editarPuntoVentaController.lbTelefonoDos.value')}" />
|
value="${c:l('editarPuntoVentaController.lbTelefonoDos.value')}" />
|
||||||
<textbox id="numtelefonodos"
|
<textbox id="numtelefonodos"
|
||||||
constraint="no zero" width="70%" maxlength="40"
|
constraint="no zero" width="70%" maxlength="15"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue