Fieldpine Logo Documentation Home  

Payments PHYSICAL Table Structure

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.

Overview

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.

Mesh

On mesh configured systems, this table is maintained as an output

Columns

FieldNameDatatypeMeta InfoGnapDescription
sidlong100/EInternal sale number allocated to this sale. References Sales.sid
typelong101/ECoded number indicating the type of payment.
amountmoney102/sAmount of this payment. Signs of payments are dependant of payment types definition.
amount2money118/sEffective 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_idlong103/EThe link to eftpos payment information, typically via the STAN field. STAN is not unique and can be repeated on different terminals
datetimedate104/sDate and time the payment was applied to the sale
sequencelong105/E
ridlong106/E
authcodestring:24,zerolen107/s
foreignamountmoney108/s
foreignratestring109/s
cardnumstring(24110/s
cardnamestring(32111/s
relatedtypelong112/E
bartercardexpstring113/s
externalrefstring 82114/s Holds a reference number to an external payment provider.
SvcAccidlong115/EThe Prepay card account this payment references, if this payment was made by a prepay card
dayseqnumlong116/E
physkeystring:44,zerolen117/sUnique key for this record

Indexing

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.