<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="costo_total_orden_trabajo" pageWidth="750" pageHeight="900" columnWidth="710" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.2100000000000193"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<property name="ireport.jasperserver.reportUnit" value="/reports/inventario/comprobante_entrada_con"/>
	<property name="ireport.jasperserver.url" value="http://localhost:18095/jasperserver/services/repository"/>
	<parameter name="id_vigencia" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="id_cen_op" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<parameter name="entidad_cliente" class="java.lang.String"/>
	<parameter name="id_orden_trabajo" class="java.math.BigDecimal">
		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT

(select valor from in_param_inventario where parametro = 'ORDEN_TRABAJO_FIRMA') as ORDEN_TRABAJO_FIRMA,
(select valor from in_param_inventario where parametro = 'ORDEN_TRABAJO_CARGO') as ORDEN_TRABAJO_CARGO,

tab0.id_orden_trabajo as id_orden_trabajo, tab0.id_vigencia as id_vigencia,
tab0.id_cen_op as id_cen_op, tab0.id_tipo_servicio as id_tipo_servicio,
tab0.fecha_orden as fecha_orden, tab0.id_mae_ter as id_mae_ter,
tab0.titulo_libro as titulo_libro, tab0.titulo_revista as titulo_revista,
tab0.volumen as volumen, tab0.numero as numero, tab0.cantidad as cantidad,
tab0.observaciones as observaciones,
tab0.fecha_recepcion as fecha_recepcion, tab0.fecha_entrega as fecha_entrega,
tab0.costo_trabajo as costo_trabajo, tab0.fecha_log as fecha_log,
tab0.id_usuario as id_usuario, tab0.estado as estado,
tab0.anulado as anulado, tab0.fecha_anu as fecha_anu,
tab0.motivo_anu as motivo_anu, tab0.id_usuario_anu as id_usuario_anu,
tab0.nom_cen_op as nom_cen_op, tab0.prefijo as prefijo,
tab0.aplica_orden as aplica_orden, tab0.desc_tipser as desc_tipser, tab0.abre_tipser as abre_tipser,
tab0.num_doc as num_doc, tab0.razon_soc as razon_soc,
tab0.num_doc||' - '||tab0.razon_soc as completo, tab0.dv as dv,
tab0.id_tipo_doc as id_tipo_doc,
tab0.desc_tipide as desc_tipide, tab0.abre_tipide as abre_tipide,
tab0.num_doc_terusu as num_doc_terusu, tab0.razon_soc_terusu as razon_soc_terusu,
tab0.num_doc_terusuanu as num_doc_terusuanu,
tab0.razon_soc_terusuanu as razon_soc_terusuanu,

(nvl(matpri.valor_total,0) + nvl(pers.valor_total,0)) as costo_total,
round( (nvl(matpri.valor_total,0) + nvl(pers.valor_total,0)) / case when tab0.cantidad != 0 then tab0.cantidad else 1 end , 2) as costo_uni

FROM IN_ORDEN_TRABAJO_V tab0

left join(
    select
    tab0.id_orden_trabajo,
    tab0.id_vigencia,
    tab0.id_cen_op,
    sum(det.cantidad) as cantidad,
    sum(det.valor_unitario) as valor_unitario,
    round(sum(det.cantidad * det.valor_unitario),2) as  valor_total

    from in_orden_mov_con tab0

    left join in_movimientos_con_v mov
    on tab0.id_vigencia_mov = mov.id_vigencia
    and tab0.id_cen_op_mov  =  mov.id_cen_op
    and tab0.id_tipo_movimiento  =  mov.id_tipo_movimiento
    and tab0.id_movimientos_con  =  mov.id_movimientos_con

    left join in_det_mov_con det
    on det.id_vigencia = mov.id_vigencia
    and det.id_cen_op  =  mov.id_cen_op
    and det.id_tipo_movimiento  =  mov.id_tipo_movimiento
    and det.id_movimientos_con  =  mov.id_movimientos_con

    group by
    tab0.id_orden_trabajo,
    tab0.id_vigencia,
    tab0.id_cen_op
)matpri
on matpri.id_orden_trabajo = tab0.id_orden_trabajo
and matpri.id_vigencia = tab0.id_vigencia
and matpri.id_cen_op = tab0.id_cen_op

left join(

    select
    tab0.id_orden_trabajo,
    tab0.id_vigencia,
    tab0.id_cen_op,
    sum(tab0.valor) as valor_total

    from IN_COSTO_ORDEN_TRABAJO tab0

    group by
    tab0.id_orden_trabajo,
    tab0.id_vigencia,
    tab0.id_cen_op

)pers
on pers.id_orden_trabajo = tab0.id_orden_trabajo
and pers.id_vigencia = tab0.id_vigencia
and pers.id_cen_op = tab0.id_cen_op

WHERE
tab0.id_vigencia = $P{id_vigencia}
AND tab0.id_cen_op  =  $P{id_cen_op}
AND tab0.id_orden_trabajo = $P{id_orden_trabajo}

ORDER BY
tab0.id_vigencia,
tab0.id_cen_op,
tab0.id_orden_trabajo]]>
	</queryString>
	<field name="ORDEN_TRABAJO_FIRMA" class="java.lang.String"/>
	<field name="ORDEN_TRABAJO_CARGO" class="java.lang.String"/>
	<field name="ID_ORDEN_TRABAJO" class="java.math.BigDecimal"/>
	<field name="ID_VIGENCIA" class="java.math.BigDecimal"/>
	<field name="ID_CEN_OP" class="java.math.BigDecimal"/>
	<field name="ID_TIPO_SERVICIO" class="java.math.BigDecimal"/>
	<field name="FECHA_ORDEN" class="java.sql.Timestamp"/>
	<field name="ID_MAE_TER" class="java.math.BigDecimal"/>
	<field name="TITULO_LIBRO" class="java.lang.String"/>
	<field name="TITULO_REVISTA" class="java.lang.String"/>
	<field name="VOLUMEN" class="java.lang.String"/>
	<field name="NUMERO" class="java.lang.String"/>
	<field name="CANTIDAD" class="java.math.BigDecimal"/>
	<field name="OBSERVACIONES" class="java.lang.String"/>
	<field name="FECHA_RECEPCION" class="java.sql.Timestamp"/>
	<field name="FECHA_ENTREGA" class="java.sql.Timestamp"/>
	<field name="COSTO_TRABAJO" class="java.math.BigDecimal"/>
	<field name="FECHA_LOG" class="java.sql.Timestamp"/>
	<field name="ID_USUARIO" class="java.math.BigDecimal"/>
	<field name="ESTADO" class="java.math.BigDecimal"/>
	<field name="ANULADO" class="java.math.BigDecimal"/>
	<field name="FECHA_ANU" class="java.sql.Timestamp"/>
	<field name="MOTIVO_ANU" class="java.lang.String"/>
	<field name="ID_USUARIO_ANU" class="java.math.BigDecimal"/>
	<field name="NOM_CEN_OP" class="java.lang.String"/>
	<field name="PREFIJO" class="java.lang.String"/>
	<field name="APLICA_ORDEN" class="java.math.BigDecimal"/>
	<field name="DESC_TIPSER" class="java.lang.String"/>
	<field name="ABRE_TIPSER" class="java.lang.String"/>
	<field name="NUM_DOC" class="java.lang.String"/>
	<field name="RAZON_SOC" class="java.lang.String"/>
	<field name="COMPLETO" class="java.lang.String"/>
	<field name="DV" class="java.math.BigDecimal"/>
	<field name="ID_TIPO_DOC" class="java.math.BigDecimal"/>
	<field name="DESC_TIPIDE" class="java.lang.String"/>
	<field name="ABRE_TIPIDE" class="java.lang.String"/>
	<field name="NUM_DOC_TERUSU" class="java.lang.String"/>
	<field name="RAZON_SOC_TERUSU" class="java.lang.String"/>
	<field name="NUM_DOC_TERUSUANU" class="java.lang.String"/>
	<field name="RAZON_SOC_TERUSUANU" class="java.lang.String"/>
	<field name="COSTO_TOTAL" class="java.math.BigDecimal"/>
	<field name="COSTO_UNI" class="java.math.BigDecimal"/>
	<background>
		<band height="860" splitType="Stretch">
			<image>
				<reportElement x="181" y="229" width="494" height="361">
					<printWhenExpression><![CDATA[$F{ANULADO}.intValue()==1]]></printWhenExpression>
				</reportElement>
				<imageExpression class="java.lang.String"><![CDATA["repo:anulado.jpg"]]></imageExpression>
			</image>
			<staticText>
				<reportElement mode="Transparent" x="465" y="37" width="144" height="37" forecolor="#ADA8A8" backcolor="#FFFFFF">
					<printWhenExpression><![CDATA[$F{ANULADO}.intValue()==1]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2" rightPadding="2"/>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="15" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Fecha Anulación:]]></text>
			</staticText>
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement x="609" y="37" width="100" height="37" forecolor="#ADA8A8">
					<printWhenExpression><![CDATA[$F{ANULADO}.intValue()==1]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="15"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_ANU}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Transparent" x="74" y="229" width="589" height="381" forecolor="#C5C5C5" backcolor="#FDFBFB">
					<printWhenExpression><![CDATA[$F{ESTADO}.intValue()==1]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="98"/>
				</textElement>
				<text><![CDATA[Borrador]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Transparent" x="465" y="0" width="244" height="37" forecolor="#ADA8A8" backcolor="#FFFFFF">
					<printWhenExpression><![CDATA[$F{ESTADO}.intValue()==1]]></printWhenExpression>
				</reportElement>
				<box leftPadding="2" rightPadding="2"/>
				<textElement textAlignment="Right" verticalAlignment="Middle" rotation="None" markup="none">
					<font fontName="SansSerif" size="15" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[Orden de Trabajo Abierta]]></text>
			</staticText>
		</band>
	</background>
	<title>
		<band height="80">
			<staticText>
				<reportElement x="0" y="0" width="710" height="18"/>
				<box leftPadding="2" rightPadding="2"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Instituto Caro y Cuervo]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="17" width="710" height="18"/>
				<box leftPadding="2" rightPadding="2"/>
				<textElement textAlignment="Center" verticalAlignment="Top">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[NIT: 899.999.096-6]]></text>
			</staticText>
			<image>
				<reportElement x="1" y="0" width="181" height="53"/>
				<imageExpression class="java.lang.String"><![CDATA["repo:LogoEmpresa003.jpg"]]></imageExpression>
			</image>
			<staticText>
				<reportElement x="0" y="34" width="710" height="16"/>
				<box leftPadding="2" rightPadding="2"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="false"/>
				</textElement>
				<text><![CDATA[Sede Yerbabuena: Kilómetro 24  ]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="49" width="710" height="16"/>
				<box leftPadding="2" rightPadding="2"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="false"/>
				</textElement>
				<text><![CDATA[Autopista Norte, vía Sopó, municipio de Chía, Cundinamarca]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="64" width="710" height="16"/>
				<box leftPadding="2" rightPadding="2"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="false"/>
				</textElement>
				<text><![CDATA[PBX: 342 21 21 Ext: 211]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="0" width="710" height="80"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="1.0"/>
					<topPen lineWidth="1.0"/>
					<leftPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
					<rightPen lineWidth="1.0"/>
				</box>
				<textElement/>
				<text><![CDATA[]]></text>
			</staticText>
		</band>
	</title>
	<pageHeader>
		<band height="165" splitType="Stretch">
			<staticText>
				<reportElement x="0" y="25" width="150" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Orden No. ]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="150" y="25" width="230" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{ID_ORDEN_TRABAJO}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="0" width="710" height="25"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="14" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["ORDEN DE TRABAJO"]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="380" y="25" width="130" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Fecha:]]></text>
			</staticText>
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement x="510" y="25" width="200" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_ORDEN}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="380" y="45" width="130" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[NIT o Doc. de identidad]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="510" y="45" width="200" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUM_DOC}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="45" width="150" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Nombre Cliente]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="150" y="45" width="230" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{RAZON_SOC}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="65" width="150" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Tipo de servicio]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="150" y="65" width="230" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{DESC_TIPSER}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="85" width="150" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Titulo del Libro ]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="150" y="85" width="560" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TITULO_LIBRO}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="150" y="105" width="230" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{TITULO_REVISTA}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="105" width="150" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Título de la Revista]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="510" y="65" width="200" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{CANTIDAD}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="380" y="65" width="130" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Tiraje]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="510" y="105" width="100" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{VOLUMEN}]]></textFieldExpression>
			</textField>
			<textField isBlankWhenNull="true">
				<reportElement x="610" y="105" width="100" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{NUMERO}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="380" y="105" width="130" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Vol. y núm.]]></text>
			</staticText>
			<staticText>
				<reportElement x="380" y="125" width="230" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Fecha de recepción del trabajo]]></text>
			</staticText>
			<staticText>
				<reportElement x="380" y="145" width="230" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Fecha de entrega del trabajo]]></text>
			</staticText>
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement x="610" y="125" width="100" height="20"/>
				<box leftPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_RECEPCION}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement x="610" y="145" width="100" height="20"/>
				<box leftPadding="0">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{FECHA_ENTREGA}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="125" width="150" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Costo del trabajo]]></text>
			</staticText>
			<textField pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement x="150" y="125" width="230" height="20"/>
				<box leftPadding="0" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{COSTO_TOTAL}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00" isBlankWhenNull="true">
				<reportElement x="150" y="145" width="230" height="20"/>
				<box leftPadding="0" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{COSTO_UNI}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="145" width="150" height="20"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Costo Unitario]]></text>
			</staticText>
		</band>
	</pageHeader>
	<detail>
		<band height="78">
			<subreport>
				<reportElement x="0" y="58" width="710" height="20"/>
				<subreportParameter name="id_vigencia">
					<subreportParameterExpression><![CDATA[$P{id_vigencia}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="id_cen_op">
					<subreportParameterExpression><![CDATA[$P{id_cen_op}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="entidad_cliente">
					<subreportParameterExpression><![CDATA[$P{entidad_cliente}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="id_orden_trabajo">
					<subreportParameterExpression><![CDATA[$P{id_orden_trabajo}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:detalle_formato"]]></subreportExpression>
			</subreport>
			<staticText>
				<reportElement mode="Opaque" x="0" y="33" width="75" height="25" backcolor="#E2D9D9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None"/>
				<text><![CDATA[CÓDIGO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="75" y="33" width="305" height="25" backcolor="#E2D9D9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None"/>
				<text><![CDATA[DESCRIPCIÓN]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="380" y="33" width="75" height="25" backcolor="#E2D9D9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None"/>
				<text><![CDATA[UNIDAD DE MEDIDA]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="510" y="33" width="100" height="25" backcolor="#E2D9D9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None"/>
				<text><![CDATA[VALOR UNITARIO]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="610" y="33" width="100" height="25" backcolor="#E2D9D9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None"/>
				<text><![CDATA[VALOR TOTAL]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="455" y="33" width="55" height="25" backcolor="#E2D9D9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None"/>
				<text><![CDATA[CANT.]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="0" y="13" width="710" height="20" backcolor="#E2D9D9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None">
					<font size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Materias Primas y Servicios Externos]]></text>
			</staticText>
		</band>
		<band height="53">
			<subreport>
				<reportElement x="0" y="33" width="710" height="20"/>
				<subreportParameter name="id_vigencia">
					<subreportParameterExpression><![CDATA[$P{id_vigencia}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="id_cen_op">
					<subreportParameterExpression><![CDATA[$P{id_cen_op}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="entidad_cliente">
					<subreportParameterExpression><![CDATA[$P{entidad_cliente}]]></subreportParameterExpression>
				</subreportParameter>
				<subreportParameter name="id_orden_trabajo">
					<subreportParameterExpression><![CDATA[$P{id_orden_trabajo}]]></subreportParameterExpression>
				</subreportParameter>
				<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
				<subreportExpression class="java.lang.String"><![CDATA["repo:detalle_costo_total"]]></subreportExpression>
			</subreport>
			<staticText>
				<reportElement mode="Opaque" x="0" y="13" width="710" height="20" backcolor="#E2D9D9"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None">
					<font size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Personas]]></text>
			</staticText>
		</band>
		<band height="70">
			<staticText>
				<reportElement x="0" y="0" width="710" height="20"/>
				<box>
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font isBold="true"/>
				</textElement>
				<text><![CDATA[Observaciones]]></text>
			</staticText>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="0" y="20" width="710" height="50"/>
				<box topPadding="2" leftPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Justified" verticalAlignment="Top">
					<font size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{OBSERVACIONES}]]></textFieldExpression>
			</textField>
		</band>
		<band height="72">
			<textField isBlankWhenNull="true">
				<reportElement x="0" y="58" width="710" height="14"/>
				<box leftPadding="5" rightPadding="2"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ORDEN_TRABAJO_CARGO}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="0" width="710" height="72"/>
				<box leftPadding="2" rightPadding="2">
					<pen lineWidth="0.75"/>
					<topPen lineWidth="0.75"/>
					<leftPen lineWidth="0.75"/>
					<bottomPen lineWidth="0.75"/>
					<rightPen lineWidth="0.75"/>
				</box>
				<textElement/>
				<text><![CDATA[]]></text>
			</staticText>
			<textField isBlankWhenNull="true">
				<reportElement x="1" y="40" width="709" height="18"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{ORDEN_TRABAJO_FIRMA}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<pageFooter>
		<band height="12" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="268" y="0" width="164" height="12" forecolor="#575757"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8"/>
				</textElement>
				<text><![CDATA[Websafi - Control De Recursos Físicos
]]></text>
			</staticText>
			<textField>
				<reportElement x="546" y="0" width="110" height="12" forecolor="#575757"/>
				<textElement textAlignment="Right">
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Página "+$V{PAGE_NUMBER}+" de "]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="656" y="0" width="54" height="12" forecolor="#575757"/>
				<box leftPadding="2"/>
				<textElement>
					<font size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
</jasperReport>
