This page contains technical detail about the physical database structure. It is not required for normal day to day operation of the Point Of Sale.
This table holds individual payments relating to a sale. It is a child of the sales table. Not all payment lines in this table alter the outstanding to pay amount on a sale. Some payment types and codes hold records of payments that were attempted but did not succeed.
On mesh configured systems, this table is maintained as an output
|sid||long||100/E||Internal sale number allocated to this sale. References Sales.sid|
|type||long||101/E||Coded number indicating the type of payment.|
|amount||money||102/s||Amount of this payment. Signs of payments are dependant of payment types definition.|
|amount2||money||118/s||Effective amount of this payment. Provided for report writers to simplify SQL. This holds the sign corrected amounts, such that "select sid,sum(amount2) from payments group by sid"|
|eftpos_id||long||103/E||The link to eftpos payment information, typically via the STAN field. STAN is not unique and can be repeated on different terminals|
|datetime||date||104/s||Date and time the payment was applied to the sale|
|externalref||string 82||114/s||Holds a reference number to an external payment provider.|
|SvcAccid||long||115/E||The Prepay card account this payment references, if this payment was made by a prepay card|
|physkey||string:44,zerolen||117/s||Unique key for this record|
The primary key on this table is sid,sequence
The field physkey does not currently require an index as access to this table is usually via the sid field.