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.service.RedondeoService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.TraslaparUtil;
|
import com.rjconsultores.ventaboletos.utilerias.TraslaparUtil;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
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.MyGenericForwardComposer;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRedondeo;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRedondeo;
|
||||||
|
@ -65,9 +66,9 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
|
||||||
private List<Marca> lsMarca;
|
private List<Marca> lsMarca;
|
||||||
private List<Redondeo> lsRedondeo;
|
private List<Redondeo> lsRedondeo;
|
||||||
private List<RedondeoMarca> lsRedondeoMarca;
|
private List<RedondeoMarca> lsRedondeoMarca;
|
||||||
private Textbox txtValorinicial;
|
private MyCustomTextboxDecimal txtValorinicial;
|
||||||
private Textbox txtValorfinal;
|
private MyCustomTextboxDecimal txtValorfinal;
|
||||||
private Textbox txtValorredondeo;
|
private MyCustomTextboxDecimal txtValorredondeo;
|
||||||
private Tab tabGeneral;
|
private Tab tabGeneral;
|
||||||
private Tab tabMarca;
|
private Tab tabMarca;
|
||||||
private Combobox cmbMarca;
|
private Combobox cmbMarca;
|
||||||
|
@ -118,6 +119,7 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) {
|
public void onClick$btnSalvar(Event ev) {
|
||||||
|
|
||||||
redondeoCtrl.setFecmodif(Calendar.getInstance().getTime());
|
redondeoCtrl.setFecmodif(Calendar.getInstance().getTime());
|
||||||
redondeoCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
redondeoCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
redondeoCtrl.setActivo(Boolean.TRUE);
|
redondeoCtrl.setActivo(Boolean.TRUE);
|
||||||
|
@ -131,7 +133,7 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
|
||||||
tabGeneral.setSelected(Boolean.TRUE);
|
tabGeneral.setSelected(Boolean.TRUE);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("editarRedondeoController.MSG.necesitaDescuento"),
|
Labels.getLabel("editarRedondeoController.MSG.necesitaDescuento"),
|
||||||
Labels.getLabel("editarRedondeoController.window.title"),
|
Labels.getLabel("editarRedondeoController.window.title"),
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -251,8 +253,8 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
BigDecimal valorInicial = BigDecimal.valueOf(Double.parseDouble(txtValorinicial.getValue()));
|
BigDecimal valorInicial = txtValorinicial.getValueBigDecimal().setScale(2);
|
||||||
BigDecimal valorFinal = BigDecimal.valueOf(Double.parseDouble(txtValorfinal.getValue()));
|
BigDecimal valorFinal = txtValorfinal.getValueBigDecimal().setScale(2);
|
||||||
|
|
||||||
if (valorInicial.doubleValue() > valorFinal.doubleValue()) {
|
if (valorInicial.doubleValue() > valorFinal.doubleValue()) {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
|
@ -264,7 +266,7 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
BigDecimal valorRedondeo = new BigDecimal(BigInteger.ZERO);
|
BigDecimal valorRedondeo = new BigDecimal(BigInteger.ZERO);
|
||||||
if (!txtValorredondeo.getValue().equals("")) {
|
if (!txtValorredondeo.getValue().equals("")) {
|
||||||
valorRedondeo = BigDecimal.valueOf(Double.parseDouble(txtValorredondeo.getValue()));
|
valorRedondeo = txtValorredondeo.getValueBigDecimal().setScale(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean existe = true;
|
boolean existe = true;
|
||||||
|
@ -484,26 +486,10 @@ public class EditarRedondeoController extends MyGenericForwardComposer {
|
||||||
return txtValorfinal;
|
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() {
|
public Textbox getTxtValorredondeo() {
|
||||||
return txtValorredondeo;
|
return txtValorredondeo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTxtValorredondeo(Textbox txtValorredondeo) {
|
|
||||||
this.txtValorredondeo = txtValorredondeo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Marca> getLsMarca() {
|
public List<Marca> getLsMarca() {
|
||||||
return lsMarca;
|
return lsMarca;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,18 +65,18 @@
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaRedondeoController.lhvalorinicial.label')}"/>
|
<label value="${c:l('busquedaRedondeoController.lhvalorinicial.label')}"/>
|
||||||
<textbox id="txtValorinicial" width="100px" precision="3" scale="2"
|
<textbox id="txtValorinicial" width="100px"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
|
use="com.rjconsultores.ventaboletos.web.gui.componente.esquemaoperacional.MyCustomTextboxDecimal" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaRedondeoController.lhvalorfinal.label')}"/>
|
<label value="${c:l('busquedaRedondeoController.lhvalorfinal.label')}"/>
|
||||||
<textbox id="txtValorfinal" width="100px" precision="3" scale="2"
|
<textbox id="txtValorfinal" width="100px"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
|
use="com.rjconsultores.ventaboletos.web.gui.componente.esquemaoperacional.MyCustomTextboxDecimal" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaRedondeoController.lhvalorredondeo.label')}"/>
|
<label value="${c:l('busquedaRedondeoController.lhvalorredondeo.label')}"/>
|
||||||
<textbox id="txtValorredondeo" width="100px" precision="3" scale="2"
|
<textbox id="txtValorredondeo" width="100px"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" />
|
use="com.rjconsultores.ventaboletos.web.gui.componente.esquemaoperacional.MyCustomTextboxDecimal" />
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
|
Loading…
Reference in New Issue