fixes bug#15055
qua:renato dev:lucas git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@95967 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
150214542d
commit
d5e12c0ec5
|
@ -35,6 +35,7 @@ import com.rjconsultores.ventaboletos.service.RedondeoMarcaService;
|
|||
import com.rjconsultores.ventaboletos.service.RedondeoService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.TraslaparUtil;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.gui.componente.esquemaoperacional.MyCustomTextboxDecimal;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRedondeo;
|
||||
|
@ -65,9 +66,9 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
|
|||
private List<Marca> lsMarca;
|
||||
private List<Redondeo> lsRedondeo;
|
||||
private List<RedondeoMarca> lsRedondeoMarca;
|
||||
private Textbox txtValorinicial;
|
||||
private Textbox txtValorfinal;
|
||||
private Textbox txtValorredondeo;
|
||||
private MyCustomTextboxDecimal txtValorinicial;
|
||||
private MyCustomTextboxDecimal txtValorfinal;
|
||||
private MyCustomTextboxDecimal txtValorredondeo;
|
||||
private Tab tabGeneral;
|
||||
private Tab tabMarca;
|
||||
private Combobox cmbMarca;
|
||||
|
@ -118,6 +119,7 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
public void onClick$btnSalvar(Event ev) {
|
||||
|
||||
redondeoCtrl.setFecmodif(Calendar.getInstance().getTime());
|
||||
redondeoCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
redondeoCtrl.setActivo(Boolean.TRUE);
|
||||
|
@ -251,8 +253,8 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
|
|||
|
||||
try {
|
||||
|
||||
BigDecimal valorInicial = BigDecimal.valueOf(Double.parseDouble(txtValorinicial.getValue()));
|
||||
BigDecimal valorFinal = BigDecimal.valueOf(Double.parseDouble(txtValorfinal.getValue()));
|
||||
BigDecimal valorInicial = txtValorinicial.getValueBigDecimal().setScale(2);
|
||||
BigDecimal valorFinal = txtValorfinal.getValueBigDecimal().setScale(2);
|
||||
|
||||
if (valorInicial.doubleValue() > valorFinal.doubleValue()) {
|
||||
Messagebox.show(
|
||||
|
@ -264,7 +266,7 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
|
|||
|
||||
BigDecimal valorRedondeo = new BigDecimal(BigInteger.ZERO);
|
||||
if (!txtValorredondeo.getValue().equals("")) {
|
||||
valorRedondeo = BigDecimal.valueOf(Double.parseDouble(txtValorredondeo.getValue()));
|
||||
valorRedondeo = txtValorredondeo.getValueBigDecimal().setScale(2);
|
||||
}
|
||||
|
||||
boolean existe = true;
|
||||
|
@ -484,26 +486,10 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
|
|||
return txtValorfinal;
|
||||
}
|
||||
|
||||
public void setTxtValorfinal(Textbox txtValorfinal) {
|
||||
this.txtValorfinal = txtValorfinal;
|
||||
}
|
||||
|
||||
public Textbox getTxtValorinicial() {
|
||||
return txtValorinicial;
|
||||
}
|
||||
|
||||
public void setTxtValorinicial(Textbox txtValorinicial) {
|
||||
this.txtValorinicial = txtValorinicial;
|
||||
}
|
||||
|
||||
public Textbox getTxtValorredondeo() {
|
||||
return txtValorredondeo;
|
||||
}
|
||||
|
||||
public void setTxtValorredondeo(Textbox txtValorredondeo) {
|
||||
this.txtValorredondeo = txtValorredondeo;
|
||||
}
|
||||
|
||||
public List<Marca> getLsMarca() {
|
||||
return lsMarca;
|
||||
}
|
||||
|
|
|
@ -65,18 +65,18 @@
|
|||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('busquedaRedondeoController.lhvalorinicial.label')}"/>
|
||||
<textbox id="txtValorinicial" width="100px" precision="3" scale="2"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
|
||||
<textbox id="txtValorinicial" width="100px"
|
||||
use="com.rjconsultores.ventaboletos.web.gui.componente.esquemaoperacional.MyCustomTextboxDecimal" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaRedondeoController.lhvalorfinal.label')}"/>
|
||||
<textbox id="txtValorfinal" width="100px" precision="3" scale="2"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
|
||||
<textbox id="txtValorfinal" width="100px"
|
||||
use="com.rjconsultores.ventaboletos.web.gui.componente.esquemaoperacional.MyCustomTextboxDecimal" />
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaRedondeoController.lhvalorredondeo.label')}"/>
|
||||
<textbox id="txtValorredondeo" width="100px" precision="3" scale="2"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
|
||||
<textbox id="txtValorredondeo" width="100px"
|
||||
use="com.rjconsultores.ventaboletos.web.gui.componente.esquemaoperacional.MyCustomTextboxDecimal" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
|
Loading…
Reference in New Issue