-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have a form that contains a grid whose model is a list that is writted during the execution of the init annotation.
The comboboxes included in every row provoke:
GRAVE: >>org.zkoss.zk.ui.UiException: Unsupported child for Combobox: <row null="">
at org.zkoss.zul.Combobox.beforeChildAdded(Combobox.java:790) at org.zkoss.zk.ui.AbstractComponent.insertBefore(AbstractComponent.java:1089) at org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:100) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:809) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:778) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:687) at org.zkoss.zk.ui.impl.UiEngineImpl.access$800(UiEngineImpl.java:86) at org.zkoss.zk.ui.impl.UiEngineImpl$TemplateImpl.create(UiEngineImpl.java:2178) at org.zkoss.bind.impl.BindComboitemRenderer.render(BindComboitemRenderer.java:74) at org.zkoss.zul.Combobox$Renderer.render(Combobox.java:460) at org.zkoss.zul.Combobox$Renderer.access$300(Combobox.java:443) at org.zkoss.zul.Combobox.onInitRender(Combobox.java:360) at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2732) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2660) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:534) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:461)
In to aftercompose annotation and onCreate event give the same effect
After, in the first event that refreshes information, The form is represented correctly
Since it is possible to solve? please
The model of her bent is created before to the generation of the rows of the grid
lines 313 and 327 of zul
<zk xmlns="<a href=" http:="" www.zkoss.org="" 2005="" zul"="">http://www.zkoss.org/2005/zul"
xmlns:w="http://www.zkoss.org/2005/zk/client"
xmlns:h="http://www.zkoss.org/2005/zk/native"
id="login" title="BSFPortal Login" border="normal">
<style dynamic="true">
.numerico{
padding-right: 3px;
text-align: right;
border:1px solid gray;
}
.numericoSalida{
padding-right: 3px;
text-align: right;
border:0px solid gray;
background : transparent;
}
.cajaDetalle{
height: 48px;
float: left;
padding: 6px;
border:0px solid gray;
}
</style>
<script type="text/javascript" src="scripts/misc.js"/>
<h:table style="border-color:yellow;" id="Continente" align="center" width="98%">
<h:tr>
<h:td align="center">
<window id="dataentry" width="98%" xmlns:h="<a href=" http:="" www.w3.org="" 1999="" xhtml"="">http://www.w3.org/1999/xhtml"
xmlns:w="http://www.zkoss.org/2005/zk/client"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('es.indra.bsf.portal.forms.personalizados.gbr.viewmodels.DataentryViewModel')"
sclass="dataentryBorder" onCreate="@command('onCreateWindow')">
<h:table align="center" width="100%">
<h:tr>
<h:td colspan="2">
<h:table align="center" width="100%">
<h:tr>
<h:td colspan="3" align="center" sclass="dataentryFirstTab">
<label value="${c:l('dataentry.CInteractiva')}" style="font-weight: bold"/>
</h:td>
</h:tr>
<!-- INFO DE CAMPOS OBLIGATORIOS -->
<h:tr>
<h:td colspan="3" align="left" style="font-style: italic">
<label value="${c:l('dataentry.CamposObligatorios')}"/>
</h:td>
</h:tr>
<h:tr height="20px">
<h:td/>
</h:tr>
<!-- DATOS DE LAS EMPRESAS -->
<h:tr>
<!-- EMPRESA EMISORA -->
<h:td width="50%" valign="top">
<h:table width="100%">
<h:tr>
<h:td colspan="2" align="center" sclass="dataentrySecondTab">${c:l('dataentry.Emisor')}</h:td>
</h:tr>
<h:tr>
<h:td>
<!-- DATOS EMISOR -->
<grid class="grid_f">
<columns>
<column width="35%" align="left" />
<column width="65%" align="left" />
</columns>
<rows>
<row>
<label value="${c:l('dataentry.CIFRazonSocial')} *"/>
<combobox id="cbCIFEmis" model="@load(vm.listEmpresasEmisoras) @template('tplEmprEmis')" selectedItem="@bind(vm.datosFactura.empresaEmisoraSelecc)" width="250px" autodrop="true" buttonVisible="true" readonly="true" mold="rounded">
<template name="tplEmprEmis">
<comboitem label="@load(each) @converter(vm.codigoYDenominacion)" value="@load(each)" />
</template>
</combobox>
</row>
<row>
<label value="${c:l('dataentry.direccion')}"/>
<textbox value="@load(vm.datosFactura.empresaEmisoraSelecc.address)" readonly="true" mold="rounded" width="250px"/>
</row>
<row>
<label value="${c:l('dataentry.ciudad')}"/>
<textbox value="@load(vm.datosFactura.empresaEmisoraSelecc.locality)" readonly="true" mold="rounded" width="250px"/>
</row>
<row>
<label value="${c:l('dataentry.CodigoPostal')}"/>
<textbox value="@load(vm.datosFactura.empresaEmisoraSelecc.postalCode)" readonly="true" mold="rounded" width="250px"/>
</row>
<row>
<label value="${c:l('dataentry.provincia')}"/>
<textbox value="@load(vm.datosFactura.empresaEmisoraSelecc.province)" readonly="true" mold="rounded" width="250px"/>
</row>
<row>
<label value="${c:l('dataentry.Pais')}"/>
<textbox value="@load(vm.datosFactura.empresaEmisoraSelecc.country)" readonly="true" mold="rounded" width="250px"/>
</row>
</rows>
</grid>
</h:td>
</h:tr>
</h:table>
</h:td>
<!-- FIN EMPRESA EMISORA -->
<!-- EMPRESA RECEPTORA -->
<h:td width="50%" valign="top">
<h:table align="center" width="100%">
<h:tr>
<h:td colspan="2" align="center" sclass="dataentrySecondTab">${c:l('dataentry.Receptor')}</h:td>
</h:tr>
<h:tr>
<h:td>
<!-- DATOS RECEPTOR -->
<grid class="grid_f">
<columns>
<column width="35%" align="left" />
<column width="65%" align="left" />
</columns>
<rows>
<row>
<label value="${c:l('dataentry.CIFRazonSocial')} *"/>
<combobox id="cbCIFRecep" model="@load(vm.listEmpresasReceptoras) @template('tplEmprRecep')" selectedItem="@bind(vm.datosFactura.empresaReceptoraSelecc)" width="250px" autodrop="true" buttonVisible="true" readonly="true" mold="rounded">
<template name="tplEmprRecep">
<comboitem label="@load(each) @converter(vm.codigoYDenominacion)" value="@load(each)" />
</template>
</combobox>
</row>
<row>
<label value="${c:l('dataentry.direccion')}"/>
<textbox value="@load(vm.datosFactura.empresaReceptoraSelecc.address)" readonly="true" mold="rounded" width="250px"/>
</row>
<row>
<label value="${c:l('dataentry.ciudad')}"/>
<textbox value="@load(vm.datosFactura.empresaReceptoraSelecc.locality)" readonly="true" mold="rounded" width="250px"/>
</row>
<row>
<label value="${c:l('dataentry.CodigoPostal')}"/>
<textbox value="@load(vm.datosFactura.empresaReceptoraSelecc.postalCode)" readonly="true" mold="rounded" width="250px"/>
</row>
<row>
<label value="${c:l('dataentry.provincia')}"/>
<textbox value="@load(vm.datosFactura.empresaReceptoraSelecc.province)" readonly="true" mold="rounded" width="250px"/>
</row>
<row>
<label value="${c:l('dataentry.Pais')}"/>
<textbox value="@load(vm.datosFactura.empresaReceptoraSelecc.country)" readonly="true" mold="rounded" width="250px"/>
</row>
</rows>
</grid>
<!-- FIN DATOS RECEPTOR -->
</h:td>
</h:tr>
</h:table>
</h:td>
</h:tr>
<!-- FIN EMPRESA RECEPTORA -->
</h:table>
</h:td>
</h:tr>
<h:tr height="20px">
<h:td/>
</h:tr>
<!-- IDENTIFICACION DE LA FACTURA -->
<h:tr>
<h:td colspan="2">
<h:table align="center" width="100%">
<h:tr>
<h:td colspan="5" align="center" sclass="dataentryFirstTab">
<label value="${c:l('dataentry.Factura')}" style="font-weight: bold" />
</h:td>
</h:tr>
<h:tr height="8px">
<h:td/>
</h:tr>
<h:tr>
<h:td width="25%"/>
<h:td width="50%">
<grid class="grid_f">
<columns>
<column width="35%" align="left" />
<column width="65%" align="left" />
</columns>
<rows>
<row>
<label value="${c:l('dataentry.TipoFactura')} *" width="100px"/>
<combobox model="@load(vm.listaTiposFactura) @template('tplTiposFactura')" selectedItem="@bind(vm.datosFactura.tipoFactura)" onChange="@command('onChangeTipoFactura')" width="250px" autodrop="true" buttonVisible="true" readonly="true" mold="rounded">
<template name="tplTiposFactura">
<comboitem label="@load(each)" value="@load(each)" />
</template>
</combobox>
</row>
<row>
<label value="${c:l('dataentry.NFactura')} *"/>
<textbox value="@bind(vm.datosFactura.nroFactura)" cols="20" maxlength="20" />
</row>
<row id="rwNroFactRectificativa" visible="false">
<label value="${c:l('dataentry.NFacturaRectificativa')}"/>
<textbox value="@bind(vm.datosFactura.nroFacturaRectificativa)" cols="20" maxlength="20" />
</row>
<row>
<label value="${c:l('dataentry.FechaFactura')} *"/>
<hbox>
<datebox value="@bind(vm.datosFactura.fechaFactura)" width="100px" format="dd/MM/yyyy" style="color: black;" constraint="no future: ${c:l('dataentry.FechaFutura')}"/>
<label value=" dd/mm/aaaa"/>
</hbox>
</row>
<row>
<label value="${c:l('dataentry.Divisa')} *"/>
<combobox model="@load(vm.listaTiposMoneda) @template('tplTiposMoneda')" selectedItem="@bind(vm.datosFactura.divisa)" onChange="@command('onChangeTipoMoneda')" width="80px" autodrop="true" buttonVisible="true" readonly="true" mold="rounded">
<template name="tplTiposMoneda">
<comboitem label="@load(each))" value="@load(each)" />
</template>
</combobox>
</row>
<row id="rwCambioDivisa" visible="false">
<label value="Cambio${c:l('dataentry.Cambio')} *"/>
<decimalbox value="@bind(vm.datosFactura.cambio)" format="#,##0.00" sclass="numerico" />
</row>
</rows>
</grid>
</h:td>
<h:td width="25%"/>
</h:tr>
</h:table>
</h:td>
</h:tr>
<h:tr>
<h:td height="5px"/>
</h:tr>
<!-- DATOS DE LOS SERVICIOS - LINEAS DE DETALLE -->
<h:tr>
<h:td colspan="3" align="center" sclass="dataentryFirstTab">
<label value="${c:l('dataentry.DServicios')}" style="font-weight: bold" />
</h:td>
</h:tr>
<h:tr>
<h:td colspan="3" align="center">
<div align="left" style="height:50px;padding-left:10px;padding-top:6px;">
<label value="Mismo Impuesto para todos los servicios con valores " />
<combobox model="@load(vm.listaTiposImpto) @template('tplTiposImptoG')" selectedItem="@bind(vm.tipoImptoG)" onChange="@command('tipoImptoIgual')" width="64px" autodrop="true" buttonVisible="true" readonly="true" mold="rounded">
<template name="tplTiposImptoG">
<comboitem label="@load(each)" value="@load(each)" />
</template>
</combobox>
<decimalbox id="dxPctImptoG" value="@bind(vm.pctImptoG)" onChange="@command('pctImptoIgual')" format="#0.00" sclass="numerico" width="38px" />
<label value=" %" />
</div>
<grid model="@bind(vm.datosFactura.listaLineaDetalleFactura)" width="868px" style="border:1px solid gray;">
<columns>
<column label="" style="text-align:center; color:green" width="40px" />
<column label="${c:l('pedido')}" style="text-align:center; color:green" width="120px" />
<column label="${c:l('posic')}" style="text-align:center; color:green" width="70px" />
<column label="${c:l('datosDetalle')}" style="text-align:center; color:green" width="590px" />
<column label="${c:l('elim')}" style="text-align:center; color:green" width="48px" />
</columns>
<rows>
<template name="model" var="servicio" status="stServicio">
<row valign="top" style="border-top:1px solid gray">
<detail open="false" fulfill="onOpen" tooltip="ttpDtosCgos">
<vbox >
<hbox>
<space width="186px" />
<div style="border:1px solid gray;" width="570px">
<include src="dtosDetalle.zul" />
<button label="${c:l('dataentry.gb.addDto')}" onClick="@command('incluirDtoDetalle',nroLinea=stServicio.index)" image="/resources/img/mas.jpg" />
</div>
</hbox>
<hbox>
<space width="186px" />
<div style="border:1px solid gray;" width="570px">
<include src="cargosDetalle.zul" />
<button label="${c:l('dataentry.gb.addCargo')}" onClick="@command('incluirCargoDetalle',nroLinea=stServicio.index)" image="/resources/img/mas.jpg"/>
</div>
</hbox>
</vbox>
</detail>
<label if="${servicio.origen=='I'}" value="@load(servicio.pedido)" />
<textbox unless="${servicio.origen=='I'}" value="@bind(servicio.pedido)" mold="rounded" maxlength="8" width="60px" />
<label if="${servicio.origen=='I'}" value="@load(servicio.posicionPedido)" />
<textbox unless="${servicio.origen=='I'}" value="@bind(servicio.posicionPedido)" mold="rounded" maxlength="3" width="30px" />
<vbox style="border:1px solid gray">
<hbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.Descripcion')}" />
<textbox value="@bind(servicio.descripcion)" mold="rounded" width="200px" />
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.Importe')}" />
<decimalbox value="@bind(servicio.totalCoste)" onChange="@command('onChangeTotalCoste',nroLinea=stServicio.index,cpto=servicio)" format="#,##0.00" sclass="numerico" width="58px" constraint="no negative: ${c:l('dataentry.gb.noNegativos')}" />
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.cantidad')}" />
<decimalbox value="@bind(servicio.cantidad)" format="#,##0.00" sclass="numerico" width="38px" />
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.unidMedida')}" style="white-space: nowrap;" />
<combobox model="@load(vm.listaUnidadesMedida) @template('tplUd')" selectedItem="@bind(servicio.unidadDeMedida)" width="100px" autodrop="true" buttonVisible="true" readonly="true" mold="rounded">
<template name="tplUd">
<comboitem label="@load(each)" value="@load(each)" />
</template>
</combobox>
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.PrecioUnitario')}" style="white-space: nowrap;" />
<decimalbox value="@bind(servicio.precioUnitario)" format="#,##0.00" sclass="numericoSalida" width="48px" readonly="true" />
</vbox>
</hbox>
<hbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.TipoImpuesto')}" style="white-space: nowrap;" />
<combobox model="@load(vm.listaTiposImpto) @template('tplTiposImpto')" selectedItem="@bind(servicio.tipoImpto)" onChange="@command('onChangeDatosImpto')" width="64px" autodrop="true" buttonVisible="true" readonly="true" mold="rounded">
<template name="tplTiposImpto">
<comboitem label="@load(each)" value="@load(each)" />
</template>
</combobox>
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.PorcImpuesto')}" style="white-space: nowrap;" />
<decimalbox value="@bind(servicio.pctImpto)" onChange="@command('onChangeDatosImpto')" format="#0.00" sclass="numerico" width="38px" constraint="no negative: ${c:l('dataentry.gb.noNegativos')}" />
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.CuotaImpuesto')}" style="white-space: nowrap;" />
<decimalbox value="@load(servicio.cuotaImpto)" format="#,##0.00" sclass="numericoSalida" width="48px" readonly="true" />
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.pctRetencion')}" style="white-space: nowrap;" />
<decimalbox value="@bind(servicio.pctReten)" onChange="@command('onChangeDatosImpto')" format="#0.00" sclass="numerico" width="38px" constraint="no negative: ${c:l('dataentry.gb.noNegativos')}" />
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.cuotaRetencion')}" style="white-space: nowrap;" />
<decimalbox value="@load(servicio.cuotaReten)" format="#,##0.00" sclass="numericoSalida" width="48px" readonly="true" />
</vbox>
</hbox>
<hbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.nroAlbaran')}" style="white-space: nowrap;" />
<textbox value="@bind(servicio.nroAlbaran)" mold="rounded" width="80px" />
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.FechaAlbaran')}" style="white-space: nowrap;" />
<datebox value="@bind(servicio.fechaAlbaran)" mold="rounded" width="82px" format="dd/MM/yyyy" />
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.nroArticulo')}" style="white-space: nowrap;" />
<textbox value="@bind(servicio.nroArticulo)" mold="rounded" width="50px" />
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.nroArticuloProveedor')}" style="white-space: nowrap;" />
<textbox value="@bind(servicio.nroArticuloProveedor)" mold="rounded" width="70px" />
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.gb.sumaDtos')}" style="white-space: nowrap;" />
<decimalbox value="@load(servicio.descuentos.sumaDescuentos)" format="#,##0.00" sclass="numericoSalida" readonly="true" width="58px" />
</vbox>
<vbox sclass="cajaDetalle">
<label value="${c:l('dataentry.gb.sumaCargos')}" style="white-space: nowrap;" />
<decimalbox value="@load(servicio.cargos.sumaCargos)" format="#,##0.00" sclass="numericoSalida" readonly="true" width="58px" />
</vbox>
</hbox>
</vbox>
<button image="/resources/img/papelerar24x24.jpg" onClick="@command('eliminarLineaDetalle',nroLinea=stServicio.index,servicio=servicio)" tooltip="ttpEliminar" />
</row>
</template>
</rows>
</grid>
<button id="btnAddLineaDetalle" label="${c:l('dataentry.gb.addServicio')}" style="font-color:green;" onClick="@command('incluirLineaDetalle')" image="/resources/img/mas.jpg"/>
</h:td>
</h:tr>
<!-- FIN DATOS DE LOS SERVICIOS - LINEAS DE DETALLE -->
<h:tr height="20px">
<h:td/>
</h:tr>
<!-- DESCUENTOS Y CARGOS -->
<h:tr>
<h:td colspan="3" align="center" sclass="dataentryFirstTab">
<label value="${c:l('dataentry.DescuentosCargos')}" style="font-weight: bold" />
</h:td>
</h:tr>
<h:tr>
<h:td colspan="3" align="center">
<hbox>
<vbox>
<!-- DESCUENTOS -->
<grid model="@bind(vm.datosFactura.descuentos.listaDescuento) @template('tplDtosFact')" width="430px" style="border:1px solid gray;">
<auxhead>
<auxheader colspan="5" style="text-align:center;">${c:l('dataentry.Descuentos')}</auxheader>
</auxhead>
<columns>
<column label="${c:l('dataentry.Concepto')}" style="text-align:center; color:green" width="120px" />
<column label="${c:l('dataentry.tipo')}" style="text-align:center; color:green" width="100px" />
<column label="%" style="text-align:center; color:green" width="60px" />
<column label="${c:l('dataentry.Importe')}" style="text-align:center; color:green" width="100px" />
<column label="" style="text-align:center; color:green" width="50px" />
</columns>
<rows>
<template name="tplDtosFact" var="dtoFact">
<row>
<combobox model="@load(vm.listaMotivosDto) @template('tplMotivosDto')" selectedItem="@bind(dtoFact.discountReason)" width="100px" autodrop="true" buttonVisible="true" mold="rounded" readonly="true">
<template name="tplMotivosDto" >
<comboitem label="@load(each)" value="@load(each)" />
</template>
</combobox>
<combobox autodrop="true" buttonVisible="true" width="84px" selectedItem="@bind(dtoFact.tipo)" onSelect="@command('onSelectTipoDtoFactura',dto=dtoFact)" mold="rounded" readonly="true">
<comboitem label="${c:l('dataentry.Porcentaje')}" value="P" description="${c:l('dataentry.gb.descrPct')}" image="/resources/img/pct.png" />
<comboitem label="${c:l('dataentry.Importe')}" value="I" description="${c:l('dataentry.gb.descrImpteDto')}" image="/resources/img/euro.png" />
</combobox>
<decimalbox value="@bind(dtoFact.discountRate)" onChange="@command('onChangeDatosDtoFactura',dto=dtoFact)" format="#0.00" sclass="@load(dtoFact.sclassPorcentaje)" width="40px" readonly="@load(!dtoFact.porPorcentaje)" constraint="no negative: ${c:l('dataentry.gb.noNegativos')}" />
<decimalbox value="@bind(dtoFact.discountAmount)" onChange="@command('onChangeDatosDtoFactura',dto=dtoFact)" format="#,##0.00" sclass="@load(dtoFact.sclassImporte)" width="80px" readonly="@load(!dtoFact.porImporte)" constraint="no negative: ${c:l('dataentry.gb.noNegativos')}" />
<button image="/resources/img/papelerar16x16.jpg" onClick="@command('eliminarDtoFactura',dto=dtoFact)" tooltip="ttpEliminar" />
</row>
</template>
</rows>
</grid>
<button label="${c:l('dataentry.gb.addDto')}" onClick="@command('incluirDtoFactura')" image="/resources/img/mas.jpg" />
</vbox>
<space />
<vbox>
<!-- CARGOS -->
<grid model="@load(vm.datosFactura.cargos.listaCargo) @template('tplCargosFact')" width="270px" style="border:1px solid gray;">
<auxhead>
<auxheader colspan="5" style="text-align:center;">${c:l('dataentry.cargos')}</auxheader>
</auxhead>
<columns>
<column label="${c:l('dataentry.Concepto')}" style="text-align:center; color:green" width="120px" />
<column label="${c:l('dataentry.tipo')}" style="text-align:center; color:green" width="100px" visible="false" />
<column label="%" style="text-align:center; color:green" width="60px" visible="false" />
<column label="${c:l('dataentry.Importe')}" style="text-align:center; color:green" width="100px" />
<column label="" style="text-align:center; color:green" width="50px" />
</columns>
<rows>
<template name="tplCargosFact" var="cargoFact">
<row>
<combobox model="@load(vm.listaMotivosCrgo) @template('tplMotivosCrgo')" selectedItem="@bind(cargoFact.chargeReason)" width="100px" autodrop="true" buttonVisible="true" mold="rounded" readonly="true">
<template name="tplMotivosCrgo" >
<comboitem label="@load(each)" value="@load(each)" />
</template>
</combobox>
<combobox autodrop="true" buttonVisible="true" width="84px" selectedItem="@bind(cargoFact.tipo)" onSelect="@command('onSelectTipoCargoFactura',nroLinea=stServicio.index,crgo=cargoFact)" mold="rounded" readonly="true">
<comboitem label="${c:l('dataentry.Porcentaje')}" value="P" description="${c:l('dataentry.gb.descrPct')}" image="/resources/img/pct.png" />
<comboitem label="${c:l('dataentry.Importe')}" value="I" description="${c:l('dataentry.gb.descrImpteCargo')}" image="/resources/img/euro.png" />
</combobox>
<decimalbox value="@bind(cargoFact.chargeRate)" onChange="@command('onChangeDatosCargoFactura',nroLinea=stServicio.index,crgo=cargoFact)" format="#0.00" sclass="@load(cargoFact.sclassPorcentaje)" width="40px" readonly="@load(!cargoFact.porPorcentaje)" constraint="no negative: ${c:l('dataentry.gb.noNegativos')}" />
<decimalbox value="@bind(cargoFact.chargeAmount)" onChange="@command('onChangeDatosCargoFactura',nroLinea=stServicio.index,crgo=cargoFact)" format="#,##0.00" sclass="@load(cargoFact.sclassImporte)" width="80px" readonly="@load(!cargoFact.porImporte)" constraint="no negative: ${c:l('dataentry.gb.noNegativos')}" />
<button image="/resources/img/papelerar16x16.jpg" onClick="@command('eliminarCargoFactura',nroLinea=stServicio.index,crgo=cargoFact)" tooltip="ttpEliminar" />
</row>
</template>
</rows>
</grid>
<button label="${c:l('dataentry.gb.addCargo')}" onClick="@command('incluirCargoFactura')" image="/resources/img/mas.jpg"/>
</vbox>
</hbox>
</h:td>
</h:tr>
<!-- FIN DESCUENTOS Y CARGOS -->
<h:tr height="20px">
<h:td/>
</h:tr>
<!-- IMPUESTOS Y RETENCIONES -->
<h:tr>
<h:td colspan="3" align="center" sclass="dataentryFirstTab">
<label value="${c:l('dataentry.ImpuestosRetenciones')}" style="font-weight: bold" />
</h:td>
</h:tr>
<h:tr>
<h:td colspan="3" align="center">
<hbox>
<vbox>
<listbox model="@bind(vm.datosFactura.tasas.listaTasa) @template('tplTasasFact')" width="354px" style="border:1px solid gray;">
<auxhead>
<auxheader colspan="4" style="text-align:center;">${c:l('dataentry.Impuestos')}</auxheader>
</auxhead>
<listhead>
<listheader label="${c:l('dataentry.tipo')}" style="text-align:center; color:green" width="70px" />
<listheader label="${c:l('dataentry.base')}" style="text-align:center; color:green" width="100px" />
<listheader label="%" style="text-align:center; color:green" width="84px" sort="auto" />
<listheader label="${c:l('dataentry.Cuota')}" style="text-align:center; color:green" width="100px" />
</listhead>
<template name="tplTasasFact">
<listitem>
<listcell>
<label value="@load(each.taxTypeCode)" />
</listcell>
<listcell>
<decimalbox value="@load(each.taxableBase)" format="#,##0.00" sclass="numericoSalida" readonly="true" />
</listcell>
<listcell>
<decimalbox value="@load(each.taxRate)" format="#0.00" sclass="numericoSalida" readonly="true" />
</listcell>
<listcell>
<decimalbox value="@load(each.taxAmount)" format="#,##0.00" sclass="numericoSalida" readonly="true" />
</listcell>
</listitem>
</template>
</listbox>
</vbox>
<space />
<vbox>
<listbox model="@load(vm.datosFactura.retenciones.listaRetencion) @template('tplRetencionesFact')" width="354px" style="border:1px solid gray;">
<auxhead>
<auxheader colspan="4" style="text-align:center;">${c:l('dataentry.retenciones')}</auxheader>
</auxhead>
<listhead>
<listheader label="${c:l('dataentry.tipo')}" style="text-align:center; color:green" width="70px" />
<listheader label="${c:l('dataentry.base')}" style="text-align:center; color:green" width="100px" />
<listheader label="%" style="text-align:center; color:green" width="84px" sort="auto" />
<listheader label="${c:l('dataentry.Cuota')}" style="text-align:center; color:green" width="100px" />
</listhead>
<template name="tplRetencionesFact">
<listitem>
<listcell>
<label value="@load(each.taxTypeCode)" />
</listcell>
<listcell>
<decimalbox value="@load(each.taxableBase)" format="#,##0.00" sclass="numericoSalida" readonly="true" />
</listcell>
<listcell>
<decimalbox value="@load(each.taxRate)" format="#0.00" sclass="numericoSalida" readonly="true" />
</listcell>
<listcell>
<decimalbox value="@load(each.taxAmount)" format="#,##0.00" sclass="numericoSalida" readonly="true" />
</listcell>
</listitem>
</template>
</listbox>
</vbox>
</hbox>
</h:td>
</h:tr>
<!-- FIN IMPUESTOS Y RETENCIONES -->
<h:tr height="20px">
<h:td/>
</h:tr>
<!-- RESUMEN FACTURA - TOTALES -->
<h:tr>
<h:td colspan="2">
<h:table align="center" width="100%">
<h:tr>
<h:td colspan="4" align="center" sclass="dataentryFirstTab">
<label value="${c:l('dataentry.TFactura')}" style="font-weight: bold" />
</h:td>
</h:tr>
<h:tr height="14px">
<h:td/>
</h:tr>
<h:tr>
<h:table align="center" width="100%">
<h:tr>
<h:td valign="center" align="right">
<label value="${c:l('dataentry.TotalImporteBruto')} " style="font-size: 12px; font-weight: bold;"/>
</h:td>
<h:td>
<decimalbox value="@load(vm.datosFactura.totFactBaseImponible)" id="dxTotBaseImponible" sclass="numerico" width="100px" readonly="true" format="#,##0.00"/>
</h:td>
<h:td valign="center" align="right">
<label value="${c:l('dataentry.TotalDescuentos')} " style="font-size: 12px; font-weight: bold;"/>
</h:td>
<h:td>
<decimalbox value="@load(vm.datosFactura.totFactDescuentos)" id="dxTotDescuentos" sclass="numerico" width="100px" readonly="true" format="#,##0.00"/>
</h:td>
<h:td valign="center" align="right">
<label value="${c:l('dataentry.TotalCargos')} " style="font-size: 12px; font-weight: bold;"/>
</h:td>
<h:td>
<decimalbox value="@load(vm.datosFactura.totFactCargos)" id="dxTotCargos" sclass="numerico" width="100px" readonly="true" format="#,##0.00"/>
</h:td>
</h:tr>
<h:tr height="15px">
<h:td/>
</h:tr>
<h:tr>
<h:td valign="center" align="right">
<label value="${c:l('dataentry.TotalCuotasImpuestos')} " style="font-size: 12px; font-weight: bold;"/>
</h:td>
<h:td>
<decimalbox value="@load(vm.datosFactura.totFactImpuestos)" id="dxTotImpuestos" sclass="numerico" width="100px" readonly="true" format="#,##0.00"/>
</h:td>
<h:td valign="center" align="right">
<label value="${c:l('dataentry.TotalCuotasRetenciones')} " style="font-size: 12px; font-weight: bold;"/>
</h:td>
<h:td>
<decimalbox value="@load(vm.datosFactura.totFactImptosRet)" id="dxTotImptosRet" sclass="numerico" width="100px" readonly="true" format="#,##0.00"/>
</h:td>
<h:td valign="center" align="right">
<label value="${c:l('dataentry.TPagar')} " style="font-size: 12px; font-weight: bold;"/>
</h:td>
<h:td>
<decimalbox value="@load(vm.datosFactura.totFactAPagar)" id="dxTotAPagar" sclass="numerico" width="100px" readonly="true" format="#,##0.00"/>
</h:td>
</h:tr>
</h:table>
</h:tr>
<h:tr height="12px">
<h:td colspan="4">
<separator bar="true"/>
</h:td>
</h:tr>
<h:tr>
<h:td colspan="4">
<h:table width="100%">
<h:tr>
<h:td width="30%" valign="center" align="center"/>
<h:td valign="center" align="left">
<button id="btnCalcularTotales" label="${c:l('dataentry.EFactura')}" onClick="@command('lanzarFactura')"/>
</h:td>
<h:td valign="center" align="right">
<button id="btnLimpiarCamposFact" label="${c:l('dataentry.LDatos')}" onClick="@command('resetDatosFactura')" />
</h:td>
<h:td width="30%" valign="center" align="center"/>
</h:tr>
<h:tr height="15px">
<h:td/>
</h:tr>
</h:table>
</h:td>
</h:tr>
</h:table>
</h:td>
</h:tr>
<!-- FIN RESUMEN FACTURA - TOTALES -->
</h:table>
</window>
</h:td>
</h:tr>
</h:table>
<popup id="ttpDtosCgos">
<label class="font_tooltip" value="${c:l('dataentry.gb.info1')}" />
</popup>
<popup id="ttpEliminar">
<label class="font_tooltip" value="${c:l('dataentry.eliminar')}" />
</popup>
</zk>
Asked: 2014-02-06 10:18:32 +0800
Seen: 43 times
Last updated: Feb 06 '14
pls show your zul
sitansu ( 2014-02-06 10:58:16 +0800 )edit