fixes bug #7848
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@59457 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
cf01dca74d
commit
7aad10323c
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zkplus.databind.TypeConverter;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrador
|
||||
*/
|
||||
public class StringDecimalToDecimalConverterScale3 implements TypeConverter {
|
||||
|
||||
private static final String FORMAT = "#####0.000";
|
||||
|
||||
public Object coerceToUi(Object val, Component comp) {
|
||||
if (val != null) {
|
||||
String format = (String) comp.getAttribute("format");
|
||||
if (format == null) {
|
||||
format = FORMAT;
|
||||
}
|
||||
DecimalFormat df = new DecimalFormat(format, new java.text.DecimalFormatSymbols(new Locale("pt", "BR")));
|
||||
return df.format(val);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object coerceToBean(Object val, Component cmpnt) {
|
||||
if (val == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (val instanceof String) {
|
||||
return (val.toString().trim().isEmpty()) ? (BigDecimal) null : new BigDecimal(val.toString().replace(".", "").replace(",", "."));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -4336,6 +4336,7 @@ editarEstadoController.MSG.suscribirOK = Estado se registró exitosamente
|
|||
editarEstadoController.MSG.borrarPergunta = Desea eliminar este estado?
|
||||
editarEstadoController.MSG.borrarOK = Estado se eliminó exitosamente
|
||||
editarEstadoController.lbUF.value = UF
|
||||
editarEstadoController.lbICMSprecio.value = ICMS cálculo de Preço
|
||||
|
||||
#Pantalla Editar Tramo Sequência
|
||||
editarTramosSecuenciaController.window.title= Tramo
|
||||
|
|
|
@ -4390,7 +4390,7 @@ busquedaEstadoController.lhDesc.label = Descrição
|
|||
busquedaEstadoController.lhDescProcon.label = Descrição Procon
|
||||
busquedaEstadoController.txtNombre.label = Estado
|
||||
busquedaEstadoController.lhPais.label = País
|
||||
busquedaEstadoController.ICMS.label = ICMS
|
||||
busquedaEstadoController.ICMS.label = ICMS Preço
|
||||
busquedaEstadoController.UF.label = UF
|
||||
|
||||
# Pantalla Editar Estado
|
||||
|
@ -4404,6 +4404,7 @@ editarEstadoController.MSG.suscribirOK = Estado Registrado com Sucesso.
|
|||
editarEstadoController.MSG.borrarPergunta = Deseja Eliminar este estado?
|
||||
editarEstadoController.MSG.borrarOK = Estado Excluido com Sucesso.
|
||||
editarEstadoController.lbUF.value = UF
|
||||
editarEstadoController.lbICMSprecio.value = ICMS cálculo de Preço
|
||||
|
||||
#Pantalla Editar Trecho Sequência
|
||||
editarTramosSecuenciaController.window.title= Trecho
|
||||
|
|
|
@ -62,19 +62,19 @@
|
|||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
vflex="true" multiple="false">
|
||||
<listhead sizable="true">
|
||||
<listheader width="9%" image="/gui/img/builder.gif"
|
||||
<listheader width="8%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaEstadoController.lhId.label')}"
|
||||
sort="auto(estadoId)" />
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaEstadoController.lhDesc.label')}"
|
||||
sort="auto(nombestado)" />
|
||||
<listheader width="14%" image="/gui/img/builder.gif"
|
||||
<listheader width="13%" image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaEstadoController.lhPais.label')}"
|
||||
sort="auto(pais.paisId)" />
|
||||
<listheader image="/gui/img/builder.gif" width="7%"
|
||||
label="${c:l('busquedaEstadoController.UF.label')}"
|
||||
sort="auto(cveestado)" />
|
||||
<listheader image="/gui/img/builder.gif" width="9%"
|
||||
<listheader image="/gui/img/builder.gif" width="13%"
|
||||
label="${c:l('busquedaEstadoController.ICMS.label')}"
|
||||
sort="auto(icms)" />
|
||||
<listheader image="/gui/img/create_doc.gif" width="9%"
|
||||
|
|
|
@ -56,6 +56,15 @@
|
|||
value="@{winEditarEstado$composer.estado.cveestado}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarEstadoController.lbICMSprecio.value')}" />
|
||||
<textbox id="txtICMS"
|
||||
width="90%" maxlength="30"
|
||||
value="@{winEditarEstado$composer.estado.icms,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverterScale3}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" precision="5" scale="3" />
|
||||
</row>
|
||||
|
||||
<row id="rowEquivalencia">
|
||||
<label value="${c:l('lb.Equivalencia')}" />
|
||||
|
|
Loading…
Reference in New Issue