CREATE TABLE ar_inv_api_headers_gt (
    TRX_HEADER_ID              NUMBER        ,
    TRX_NUMBER                 VARCHAR2(120) ,
    TRX_DATE                   DATE          ,
    TRX_CURRENCY               VARCHAR2(120) ,
    REFERENCE_NUMBER           VARCHAR2(120) ,
    TRX_CLASS                  VARCHAR2(80)  ,
    CUST_TRX_TYPE_SEQ_ID       NUMBER        ,
    GL_DATE                    DATE          ,
    BILL_TO_CUSTOMER_ID        NUMBER        ,
    BILL_TO_ACCOUNT_NUMBER     VARCHAR2(120) ,
    BILL_TO_CUSTOMER_NAME      VARCHAR2(1040),
    BILL_TO_CONTACT_ID         NUMBER        ,
    BILL_TO_ADDRESS_ID         NUMBER        ,
    BILL_TO_SITE_USE_ID        NUMBER        ,
    SHIP_TO_CUSTOMER_ID        NUMBER        ,
    SHIP_TO_ACCOUNT_NUMBER     VARCHAR2(120) ,
    SHIP_TO_CUSTOMER_NAME      VARCHAR2(1040),
    SHIP_TO_CONTACT_ID         NUMBER        ,
    SHIP_TO_ADDRESS_ID         NUMBER        ,
    SHIP_TO_SITE_USE_ID        NUMBER        ,
    SOLD_TO_CUSTOMER_ID        NUMBER        ,
    TERM_ID                    NUMBER        ,
    PRIMARY_SALESREP_ID        NUMBER        ,
    PRIMARY_SALESREP_NAME      VARCHAR2(960) ,
    EXCHANGE_RATE_TYPE         VARCHAR2(240) ,
    EXCHANGE_DATE              DATE          ,
    EXCHANGE_RATE              NUMBER        ,
    TERRITORY_ID               NUMBER        ,
    REMIT_TO_ADDRESS_ID        NUMBER        ,
    INVOICING_RULE_ID          NUMBER        ,
    PRINTING_OPTION            VARCHAR2(80)  ,
    PURCHASE_ORDER             VARCHAR2(200) ,
    PURCHASE_ORDER_REVISION    VARCHAR2(200) ,
    PURCHASE_ORDER_DATE        DATE          ,
    COMMENTS                   VARCHAR2(960) ,
    INTERNAL_NOTES             VARCHAR2(960) ,
    FINANCE_CHARGES            VARCHAR2(4)   ,
    RECEIPT_METHOD_ID          NUMBER        ,
    RELATED_CUSTOMER_TRX_ID    NUMBER        ,
    AGREEMENT_ID               NUMBER        ,
    STATUS_TRX                 VARCHAR2(120) ,
    PAYING_CUSTOMER_ID         NUMBER        ,
    PAYING_SITE_USE_ID         NUMBER        ,
    DEFAULT_TAX_EXEMPT_FLAG    VARCHAR2(4)   ,
    DOC_SEQUENCE_VALUE         NUMBER(18, 0) ,
    ORG_ID                     NUMBER(18, 0)     NOT NULL,
    LEGAL_ENTITY_ID            NUMBER        ,
    TRX_HEADER_ID              NUMBER        ,
    TRX_NUMBER                 VARCHAR2(120) ,
    TRX_DATE                   DATE          ,
    TRX_CURRENCY               VARCHAR2(120) ,
    REFERENCE_NUMBER           VARCHAR2(120) ,
    TRX_CLASS                  VARCHAR2(80)  ,
    CUST_TRX_TYPE_SEQ_ID       NUMBER        ,
    GL_DATE                    DATE          ,
    BILL_TO_CUSTOMER_ID        NUMBER        ,
    BILL_TO_ACCOUNT_NUMBER     VARCHAR2(120) ,
    BILL_TO_CUSTOMER_NAME      VARCHAR2(1040),
    BILL_TO_CONTACT_ID         NUMBER        ,
    BILL_TO_ADDRESS_ID         NUMBER        ,
    BILL_TO_SITE_USE_ID        NUMBER        ,
    SHIP_TO_CUSTOMER_ID        NUMBER        ,
    SHIP_TO_ACCOUNT_NUMBER     VARCHAR2(120) ,
    SHIP_TO_CUSTOMER_NAME      VARCHAR2(1040),
    SHIP_TO_CONTACT_ID         NUMBER        ,
    SHIP_TO_ADDRESS_ID         NUMBER        ,
    SHIP_TO_SITE_USE_ID        NUMBER        ,
    SOLD_TO_CUSTOMER_ID        NUMBER        ,
    TERM_ID                    NUMBER        ,
    PRIMARY_SALESREP_ID        NUMBER        ,
    PRIMARY_SALESREP_NAME      VARCHAR2(960) ,
    EXCHANGE_RATE_TYPE         VARCHAR2(240) ,
    EXCHANGE_DATE              DATE          ,
    EXCHANGE_RATE              NUMBER        ,
    TERRITORY_ID               NUMBER        ,
    REMIT_TO_ADDRESS_ID        NUMBER        ,
    INVOICING_RULE_ID          NUMBER        ,
    PRINTING_OPTION            VARCHAR2(80)  ,
    PURCHASE_ORDER             VARCHAR2(200) ,
    PURCHASE_ORDER_REVISION    VARCHAR2(200) ,
    PURCHASE_ORDER_DATE        DATE          ,
    COMMENTS                   VARCHAR2(960) ,
    INTERNAL_NOTES             VARCHAR2(960) ,
    FINANCE_CHARGES            VARCHAR2(4)   ,
    RECEIPT_METHOD_ID          NUMBER        ,
    RELATED_CUSTOMER_TRX_ID    NUMBER        ,
    AGREEMENT_ID               NUMBER        ,
    STATUS_TRX                 VARCHAR2(120) ,
    PAYING_CUSTOMER_ID         NUMBER        ,
    PAYING_SITE_USE_ID         NUMBER        ,
    DEFAULT_TAX_EXEMPT_FLAG    VARCHAR2(4)   ,
    DOC_SEQUENCE_VALUE         NUMBER(18, 0) ,
    ORG_ID                     NUMBER(18, 0)     NOT NULL,
    LEGAL_ENTITY_ID            NUMBER        
);
