CREATE TABLE gtg_ts_paystandardinvoice (
    ETL_SEQUENCE_ID                NUMBER(19, 0),
    ETL_VERSION_NUMBER             NUMBER(18, 0),
    DELETE_VERSION_NUMBER          NUMBER(18, 0),
    LAST_UPDATED_BY                VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_DATE               TIMESTAMP(6)     NOT NULL,
    LAST_UPDATE_LOGIN              VARCHAR2(128),
    CREATED_BY                     VARCHAR2(256)    NOT NULL,
    CREATION_DATE                  TIMESTAMP(6)     NOT NULL,
    AMOUNT_PAID                    NUMBER       ,
    APINVOICESALL_CB               VARCHAR2(256),
    APINVOICESALL_CD               TIMESTAMP(6) ,
    APINVOICESALL_LUB              VARCHAR2(256),
    APINVOICESALL_LUD              TIMESTAMP(6) ,
    AWT_GROUP_ID                   NUMBER(18, 0),
    BASE_AMOUNT                    NUMBER       ,
    BATCH_ID                       NUMBER(18, 0),
    CANCELLED_DATE                 DATE         ,
    CONTROL_AMOUNT                 NUMBER       ,
    CONVERTEDCURRENCY              VARCHAR2(200),
    CREDITED_INVOICE_ID            NUMBER(18, 0),
    CUST_REGISTRATION_NUMBER       VARCHAR2(120),
    DESCRIPTION                    VARCHAR2(960),
    DISTRIBUTION_SET_ID            NUMBER(18, 0),
    DOCUMENT_SUB_TYPE              VARCHAR2(960),
    DOC_SEQUENCE_ID                NUMBER       ,
    DOC_SEQUENCE_VALUE             NUMBER       ,
    EARLIEST_SETTLEMENT_DATE       DATE         ,
    EXCHANGE_DATE                  DATE         ,
    EXCHANGE_RATE                  NUMBER       ,
    EXCHANGE_RATE_TYPE             VARCHAR2(120),
    FREIGHT_AMOUNT                 NUMBER       ,
    GL_DATE                        DATE         ,
    INVAMTPDGL                     NUMBER       ,
    INVOICEAMTGL                   NUMBER       ,
    INVOICE_AMOUNT                 NUMBER       ,
    INVOICE_CURRENCY_CODE          VARCHAR2(60) ,
    INVOICE_DATE                   DATE         ,
    INVOICE_ID                     NUMBER(18, 0),
    INVOICE_NUM                    VARCHAR2(200),
    INVOICE_RECEIVED_DATE          DATE         ,
    INVOICE_TYPE_LOOKUP_CODE       VARCHAR2(100),
    LEGAL_ENTITY_ID                NUMBER(18, 0),
    ORGID                          NUMBER(18, 0),
    PAYMENT_CROSS_RATE             NUMBER       ,
    PAYMENT_CROSS_RATE_DATE        DATE         ,
    PAYMENT_CROSS_RATE_TYPE        VARCHAR2(120),
    PAYMENT_CURRENCY_CODE          VARCHAR2(60) ,
    PAYMENT_METHOD_CODE            VARCHAR2(120),
    PAYMENT_STATUS_FLAG            VARCHAR2(4)  ,
    PAY_GROUP_LOOKUP_CODE          VARCHAR2(100),
    PORT_OF_ENTRY_CODE             VARCHAR2(120),
    POSTING_STATUS                 VARCHAR2(60) ,
    PO_HEADER_ID                   NUMBER(18, 0),
    QUICK_CREDIT                   VARCHAR2(4)  ,
    QUICK_PO_HEADER_ID             NUMBER(18, 0),
    RELEASE_AMOUNT_NET_OF_TAX      NUMBER       ,
    REMIT_TO_SUPPLIER_NAME         VARCHAR2(960),
    SELF_ASSESSED_TAX_AMOUNT       NUMBER       ,
    SET_OF_BOOKS_ID                NUMBER(18, 0),
    SOURCE                         VARCHAR2(100),
    SUPPLIER_TAX_EXCHANGE_RATE     NUMBER       ,
    SUPPLIER_TAX_INVOICE_DATE      DATE         ,
    SUPPLIER_TAX_INVOICE_NUMBER    VARCHAR2(600),
    TAXATION_COUNTRY               VARCHAR2(120),
    TAX_INVOICE_INTERNAL_SEQ       VARCHAR2(600),
    TAX_INVOICE_RECORDING_DATE     DATE         ,
    TERMS_DATE                     DATE         ,
    TERMS_ID                       NUMBER(18, 0),
    TOTAL_TAX_AMOUNT               NUMBER       ,
    TRX_BUSINESS_CATEGORY          VARCHAR2(960),
    USER_DEFINED_FISC_CLASS        VARCHAR2(960),
    USSGL_TRANSACTION_CODE         VARCHAR2(120),
    VENDOR_ID                      NUMBER(18, 0),
    VENDOR_SITE_ID                 NUMBER(18, 0),
    WFAPPROVAL_STATUS              VARCHAR2(200),
    ETL_SEQUENCE_ID                NUMBER(19, 0),
    ETL_VERSION_NUMBER             NUMBER(18, 0),
    DELETE_VERSION_NUMBER          NUMBER(18, 0),
    LAST_UPDATED_BY                VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_DATE               TIMESTAMP(6)     NOT NULL,
    LAST_UPDATE_LOGIN              VARCHAR2(128),
    CREATED_BY                     VARCHAR2(256)    NOT NULL,
    CREATION_DATE                  TIMESTAMP(6)     NOT NULL,
    AMOUNT_PAID                    NUMBER       ,
    APINVOICESALL_CB               VARCHAR2(256),
    APINVOICESALL_CD               TIMESTAMP(6) ,
    APINVOICESALL_LUB              VARCHAR2(256),
    APINVOICESALL_LUD              TIMESTAMP(6) ,
    AWT_GROUP_ID                   NUMBER(18, 0),
    BASE_AMOUNT                    NUMBER       ,
    BATCH_ID                       NUMBER(18, 0),
    CANCELLED_DATE                 DATE         ,
    CONTROL_AMOUNT                 NUMBER       ,
    CONVERTEDCURRENCY              VARCHAR2(200),
    CREDITED_INVOICE_ID            NUMBER(18, 0),
    CUST_REGISTRATION_NUMBER       VARCHAR2(120),
    DESCRIPTION                    VARCHAR2(960),
    DISTRIBUTION_SET_ID            NUMBER(18, 0),
    DOCUMENT_SUB_TYPE              VARCHAR2(960),
    DOC_SEQUENCE_ID                NUMBER       ,
    DOC_SEQUENCE_VALUE             NUMBER       ,
    EARLIEST_SETTLEMENT_DATE       DATE         ,
    EXCHANGE_DATE                  DATE         ,
    EXCHANGE_RATE                  NUMBER       ,
    EXCHANGE_RATE_TYPE             VARCHAR2(120),
    FREIGHT_AMOUNT                 NUMBER       ,
    GL_DATE                        DATE         ,
    INVAMTPDGL                     NUMBER       ,
    INVOICEAMTGL                   NUMBER       ,
    INVOICE_AMOUNT                 NUMBER       ,
    INVOICE_CURRENCY_CODE          VARCHAR2(60) ,
    INVOICE_DATE                   DATE         ,
    INVOICE_ID                     NUMBER(18, 0),
    INVOICE_NUM                    VARCHAR2(200),
    INVOICE_RECEIVED_DATE          DATE         ,
    INVOICE_TYPE_LOOKUP_CODE       VARCHAR2(100),
    LEGAL_ENTITY_ID                NUMBER(18, 0),
    ORGID                          NUMBER(18, 0),
    PAYMENT_CROSS_RATE             NUMBER       ,
    PAYMENT_CROSS_RATE_DATE        DATE         ,
    PAYMENT_CROSS_RATE_TYPE        VARCHAR2(120),
    PAYMENT_CURRENCY_CODE          VARCHAR2(60) ,
    PAYMENT_METHOD_CODE            VARCHAR2(120),
    PAYMENT_STATUS_FLAG            VARCHAR2(4)  ,
    PAY_GROUP_LOOKUP_CODE          VARCHAR2(100),
    PORT_OF_ENTRY_CODE             VARCHAR2(120),
    POSTING_STATUS                 VARCHAR2(60) ,
    PO_HEADER_ID                   NUMBER(18, 0),
    QUICK_CREDIT                   VARCHAR2(4)  ,
    QUICK_PO_HEADER_ID             NUMBER(18, 0),
    RELEASE_AMOUNT_NET_OF_TAX      NUMBER       ,
    REMIT_TO_SUPPLIER_NAME         VARCHAR2(960),
    SELF_ASSESSED_TAX_AMOUNT       NUMBER       ,
    SET_OF_BOOKS_ID                NUMBER(18, 0),
    SOURCE                         VARCHAR2(100),
    SUPPLIER_TAX_EXCHANGE_RATE     NUMBER       ,
    SUPPLIER_TAX_INVOICE_DATE      DATE         ,
    SUPPLIER_TAX_INVOICE_NUMBER    VARCHAR2(600),
    TAXATION_COUNTRY               VARCHAR2(120),
    TAX_INVOICE_INTERNAL_SEQ       VARCHAR2(600),
    TAX_INVOICE_RECORDING_DATE     DATE         ,
    TERMS_DATE                     DATE         ,
    TERMS_ID                       NUMBER(18, 0),
    TOTAL_TAX_AMOUNT               NUMBER       ,
    TRX_BUSINESS_CATEGORY          VARCHAR2(960),
    USER_DEFINED_FISC_CLASS        VARCHAR2(960),
    USSGL_TRANSACTION_CODE         VARCHAR2(120),
    VENDOR_ID                      NUMBER(18, 0),
    VENDOR_SITE_ID                 NUMBER(18, 0),
    WFAPPROVAL_STATUS              VARCHAR2(200),
    CONSTRAINT pk_gtg_ts_paystandardinvoice PRIMARY KEY (ETL_SEQUENCE_ID, ETL_VERSION_NUMBER, ETL_SEQUENCE_ID, ETL_VERSION_NUMBER)
);
