Return to:
Database Reference Home Page
Return to:
Table Definitions Master List
*Table Name*
auto_payment_register
*Description*
Automatic payment register; this table stores incoming payments that are generated by remote payment systems like PayPal, credit card merchant providers, Amazon, Google, etc.. Payments stored here are eventually applied to AR records via the AR batch process. This can happen automatically if the payment matches the AR record and can also be processed manually in the client.
*Schema*
CREATE TABLE auto_payment_register (
"company_id" int
NOT NULL -- Company ID
REFERENCES company_master(company_id),
"txn_id" varchar(64)
NOT NULL, -- Transaction id
"payment_type" varchar(2)
NOT NULL, -- PP: Paypal
-- CC: Credit card
-- AZ: Amazon
"customer_code" varchar(128), -- Customer code
"system_order_number" varchar(10), -- System order number
"gross_amount" numeric(15,2) -- Gross amount
DEFAULT 0,
"fee_amount" numeric(15,2) -- Fee amount
DEFAULT 0,
"record_created_date" timestamp -- Date record created
without time zone
DEFAULT CURRENT_TIMESTAMP,
"payment_batched" BOOLEAN -- TRUE if payment applied to order
DEFAULT false,
"payment_batched_date" timestamp -- Date payment applied
without time zone,
"batch_id" varchar(32), -- ID of batch payment was included in
"batched_by" varchar(16), -- Employee code of who moved payment to batch
"card_number" char(20), -- Masked ("99XXXXXXXXXX9999") credit card number from viaKlix
"payment_closed" BOOLEAN -- TRUE if payment was manually closed
DEFAULT false,
"payment_closed_by" varchar(16), -- Employee code of who closed payment
"payment_closed_date" timestamp -- Date payment closed
without time zone,
"comment" varchar(32), -- User provided comments
UNIQUE(txn_id, payment_type)
);
There are no comments on this page. [Add comment]