-- ABS-131030 / ABS-141151

--- ARTRANSACTION ---

ALTER TABLE ARTRANSACTION DROP CONSTRAINT CHK_ARTRANSACTION_ORIGIN;


COMMENT ON COLUMN ARTRANSACTION.ORIGIN IS 'This field is only used internally for trouble shooting. It identifies where the ARTransaction is created.
0 = Undefined
1 = Finalize invoices
2 = Consolidated invoices
3 = Settlement
4 = Generate statement
5 = Cash application – Manual added
6 = Cash application – Generated (apply)
7 = DB Procedure ProcessPaymentTransaction
8 = DB Procedure ProcessUnappliedCredit
9 = Credit card transactions – cancel / refund
10 = Process credit card transactions
11 = Credit Card Portal
12 = Customer Financials – Credit card on demand
13 = Web Portal Credit Card payment
14 = Scheduled Credit Card Payment
15 = Card Test transaction
16 = Scheduled ACH Payment
17 = Route Assistant from Mark other invoices
18 = Electronic Payment Dialog
19 = Web Portal ACH Payment';

ALTER TABLE ARTRANSACTION ADD CONSTRAINT CHK_ARTRANSACTION_ORIGIN CHECK (ORIGIN BETWEEN 0 AND 19);

--CREDITCARDTRANSACTION

COMMENT ON COLUMN CREDITCARDTRANSACTION.ORIGIN  IS '1 = Remittance (manual via Cash application) 
2 = Refund 
3 = Miscellaneous 
4 = Generated via Statement 
5 = Generated via Settlement 
6 = Credit Card on Demand 
7 = Web Portal Payment 
8 = Scheduled Electronic payment 
9 = Card Test Transaction';

