CREATE TABLE ar_trx_summary (
    CUST_ACCOUNT_ID                  NUMBER(18, 0),
    SITE_USE_ID                      NUMBER(18, 0),
    ORG_ID                           NUMBER(18, 0),
    CURRENCY                         VARCHAR2(120),
    AS_OF_DATE                       DATE         ,
    LAST_UPDATE_DATE                 TIMESTAMP(6)     NOT NULL,
    LAST_UPDATED_BY                  VARCHAR2(256)    NOT NULL,
    CREATION_DATE                    TIMESTAMP(6)     NOT NULL,
    CREATED_BY                       VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_LOGIN                VARCHAR2(128),
    OP_BAL_HIGH_WATERMARK            NUMBER       ,
    OP_BAL_HIGH_WATERMARK_DATE       DATE         ,
    TOTAL_CASH_RECEIPTS_VALUE        NUMBER       ,
    TOTAL_CASH_RECEIPTS_COUNT        NUMBER       ,
    TOTAL_INVOICES_VALUE             NUMBER       ,
    TOTAL_INVOICES_COUNT             NUMBER       ,
    INV_PAID_AMOUNT                  NUMBER       ,
    INV_INST_PMT_DAYS_SUM            NUMBER       ,
    TOTAL_BILLS_RECEIVABLES_VALUE    NUMBER       ,
    TOTAL_BILLS_RECEIVABLES_COUNT    NUMBER       ,
    TOTAL_CREDIT_MEMOS_VALUE         NUMBER       ,
    TOTAL_CREDIT_MEMOS_COUNT         NUMBER       ,
    TOTAL_DEBIT_MEMOS_VALUE          NUMBER       ,
    TOTAL_DEBIT_MEMOS_COUNT          NUMBER       ,
    TOTAL_CHARGEBACK_VALUE           NUMBER       ,
    TOTAL_CHARGEBACK_COUNT           NUMBER       ,
    TOTAL_EARNED_DISC_VALUE          NUMBER       ,
    TOTAL_EARNED_DISC_COUNT          NUMBER       ,
    TOTAL_UNEARNED_DISC_VALUE        NUMBER       ,
    TOTAL_UNEARNED_DISC_COUNT        NUMBER       ,
    TOTAL_ADJUSTMENTS_VALUE          NUMBER       ,
    TOTAL_ADJUSTMENTS_COUNT          NUMBER       ,
    TOTAL_DEPOSITS_VALUE             NUMBER       ,
    TOTAL_DEPOSITS_COUNT             NUMBER       ,
    SUM_APP_AMT_DAYS_LATE            NUMBER       ,
    SUM_APP_AMT                      NUMBER       ,
    COUNT_OF_TOT_INV_INST_PAID       NUMBER       ,
    COUNT_OF_INV_INST_PAID_LATE      NUMBER       ,
    COUNT_OF_DISC_INV_INST           NUMBER       ,
    LARGEST_INV_AMOUNT               NUMBER       ,
    LARGEST_INV_DATE                 DATE         ,
    LARGEST_INV_CUST_TRX_ID          NUMBER(18, 0),
    DAYS_CREDIT_GRANTED_SUM          NUMBER       ,
    NSF_STOP_PAYMENT_COUNT           NUMBER       ,
    NSF_STOP_PAYMENT_AMOUNT          NUMBER       ,
    REFERENCE_1                      VARCHAR2(960),
    REFERENCE_2                      VARCHAR2(960),
    REFERENCE_3                      VARCHAR2(960),
    REFERENCE_4                      VARCHAR2(960),
    REFERENCE_5                      VARCHAR2(960),
    OBJECT_VERSION_NUMBER            NUMBER(9, 0)     NOT NULL,
    CUST_ACCOUNT_ID                  NUMBER(18, 0),
    SITE_USE_ID                      NUMBER(18, 0),
    ORG_ID                           NUMBER(18, 0),
    CURRENCY                         VARCHAR2(120),
    AS_OF_DATE                       DATE         ,
    LAST_UPDATE_DATE                 TIMESTAMP(6)     NOT NULL,
    LAST_UPDATED_BY                  VARCHAR2(256)    NOT NULL,
    CREATION_DATE                    TIMESTAMP(6)     NOT NULL,
    CREATED_BY                       VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_LOGIN                VARCHAR2(128),
    OP_BAL_HIGH_WATERMARK            NUMBER       ,
    OP_BAL_HIGH_WATERMARK_DATE       DATE         ,
    TOTAL_CASH_RECEIPTS_VALUE        NUMBER       ,
    TOTAL_CASH_RECEIPTS_COUNT        NUMBER       ,
    TOTAL_INVOICES_VALUE             NUMBER       ,
    TOTAL_INVOICES_COUNT             NUMBER       ,
    INV_PAID_AMOUNT                  NUMBER       ,
    INV_INST_PMT_DAYS_SUM            NUMBER       ,
    TOTAL_BILLS_RECEIVABLES_VALUE    NUMBER       ,
    TOTAL_BILLS_RECEIVABLES_COUNT    NUMBER       ,
    TOTAL_CREDIT_MEMOS_VALUE         NUMBER       ,
    TOTAL_CREDIT_MEMOS_COUNT         NUMBER       ,
    TOTAL_DEBIT_MEMOS_VALUE          NUMBER       ,
    TOTAL_DEBIT_MEMOS_COUNT          NUMBER       ,
    TOTAL_CHARGEBACK_VALUE           NUMBER       ,
    TOTAL_CHARGEBACK_COUNT           NUMBER       ,
    TOTAL_EARNED_DISC_VALUE          NUMBER       ,
    TOTAL_EARNED_DISC_COUNT          NUMBER       ,
    TOTAL_UNEARNED_DISC_VALUE        NUMBER       ,
    TOTAL_UNEARNED_DISC_COUNT        NUMBER       ,
    TOTAL_ADJUSTMENTS_VALUE          NUMBER       ,
    TOTAL_ADJUSTMENTS_COUNT          NUMBER       ,
    TOTAL_DEPOSITS_VALUE             NUMBER       ,
    TOTAL_DEPOSITS_COUNT             NUMBER       ,
    SUM_APP_AMT_DAYS_LATE            NUMBER       ,
    SUM_APP_AMT                      NUMBER       ,
    COUNT_OF_TOT_INV_INST_PAID       NUMBER       ,
    COUNT_OF_INV_INST_PAID_LATE      NUMBER       ,
    COUNT_OF_DISC_INV_INST           NUMBER       ,
    LARGEST_INV_AMOUNT               NUMBER       ,
    LARGEST_INV_DATE                 DATE         ,
    LARGEST_INV_CUST_TRX_ID          NUMBER(18, 0),
    DAYS_CREDIT_GRANTED_SUM          NUMBER       ,
    NSF_STOP_PAYMENT_COUNT           NUMBER       ,
    NSF_STOP_PAYMENT_AMOUNT          NUMBER       ,
    REFERENCE_1                      VARCHAR2(960),
    REFERENCE_2                      VARCHAR2(960),
    REFERENCE_3                      VARCHAR2(960),
    REFERENCE_4                      VARCHAR2(960),
    REFERENCE_5                      VARCHAR2(960),
    OBJECT_VERSION_NUMBER            NUMBER(9, 0)     NOT NULL,
    CONSTRAINT pk_ar_trx_summary PRIMARY KEY (CUST_ACCOUNT_ID, SITE_USE_ID, ORG_ID, CURRENCY, AS_OF_DATE, CUST_ACCOUNT_ID, SITE_USE_ID, ORG_ID, CURRENCY, AS_OF_DATE)
);
