<?xml version="1.0" encoding="UTF-8"?>
<!--
    Document   : recibospagoscli.xml
    Description:
        Estructura de la tabla recibospagoscli.
-->
<table>
    <column>
        <name>codcliente</name>
        <type>character varying(10)</type>
        <null>NO</null>
    </column>
    <column>
        <name>coddivisa</name>
        <type>character varying(3)</type>
    </column>
    <column>
        <name>codigofactura</name>
        <type>character varying(20)</type>
    </column>
    <column>
        <name>codpago</name>
        <type>character varying(10)</type>
    </column>
    <column>
        <name>fecha</name>
        <type>date</type>
        <null>NO</null>
    </column>
    <column>
        <name>fechapago</name>
        <type>date</type>
    </column>
    <column>
        <name>gastos</name>
        <type>double precision</type>
        <default>0</default>
    </column>
    <column>
        <name>idempresa</name>
        <type>integer</type>
        <null>NO</null>
    </column>
    <column>
        <name>idfactura</name>
        <type>integer</type>
    </column>
    <column>
        <name>idrecibo</name>
        <type>serial</type>
        <null>NO</null>
    </column>
    <column>
        <name>importe</name>
        <type>double precision</type>
        <default>0</default>
    </column>
    <column>
        <name>liquidado</name>
        <type>double precision</type>
        <default>0</default>
    </column>
    <column>
        <name>nick</name>
        <type>character varying(50)</type>
    </column>
    <column>
        <name>numero</name>
        <type>integer</type>
    </column>
    <column>
        <name>observaciones</name>
        <type>text</type>
    </column>
    <column>
        <name>pagado</name>
        <type>boolean</type>
        <default>false</default>
    </column>
    <column>
        <name>vencido</name>
        <type>boolean</type>
        <default>false</default>
    </column>
    <column>
        <name>vencimiento</name>
        <type>date</type>
    </column>
    <constraint>
        <name>recibospagoscli_pkey</name>
        <type>PRIMARY KEY (idrecibo)</type>
    </constraint>
    <constraint>
        <name>ca_recibospagoscli_clientes</name>
        <type>FOREIGN KEY (codcliente) REFERENCES clientes (codcliente) ON DELETE RESTRICT ON UPDATE CASCADE</type>
    </constraint>
    <constraint>
        <name>ca_recibospagoscli_divisas</name>
        <type>FOREIGN KEY (coddivisa) REFERENCES divisas (coddivisa) ON DELETE RESTRICT ON UPDATE CASCADE</type>
    </constraint>
    <constraint>
        <name>ca_recibospagoscli_facturascli</name>
        <type>FOREIGN KEY (idfactura) REFERENCES facturascli (idfactura) ON DELETE CASCADE ON UPDATE CASCADE</type>
    </constraint>
<column>
        <name>diferencia</name>
        <type>integer(11)</type>
    </column><column>
        <name>certificada</name>
        <type>integer(11)</type>
    </column></table>
