Skip to content

Cash Transaction Table

GEA Admin edited this page Nov 17, 2024 · 1 revision

tb_cash_trans

This is the central table behind our open books accounting system.

Field Name Field Type Default Value Description
knack_record_id char(24) '000000000000000000000000' The legacy knack unique identifier for each transaction (from Knack system).
cash_tran_id int(11) None Primary key, auto-incremented ID for the cash transaction.
sender_ecobricker varchar(50) NULL ID or name of the user who sent money in the transaction. This is usually the GEA but can be individual users in the case of an offset purchase.
datetime_sent_ts datetime None Timestamp for when the transaction was sent.
type_of_transaction varchar(40) None Type of the transaction (e.g., deposit, withdrawal).
tran_name_desc varchar(255) NULL Description or name of the transaction.
native_ccy_amt decimal(20,2) None Amount in native currency.
currency_code char(3) None 3-letter currency code (e.g., USD, GBP).
native_ccy_amt_display varchar(50) NULL Display value of the native currency amount.
exchange_ratio float None Exchange ratio for currency conversion.
usd_amount decimal(20,2) NULL Equivalent amount in USD.
total_product_cost_incl_shipping decimal(20,2) None Total product cost including shipping in native currency.
product varchar(250) NULL Name or type of the product.
product_cost decimal(10,2) NULL Cost of the product.
transaction_date_dt date None Transaction date.
shipping_cost decimal(10,2) NULL Shipping cost.
shipping_cost_+ccy_display varchar(50) NULL Display value of the shipping cost.
total_product_cost_+ccy_display varchar(100) NULL Display value of total product cost including shipping.
receiving_gea_acct varchar(20) NULL Account of the receiving GEA (Global Ecobrick Alliance).
sender_for_display varchar(50) NULL Display name of the sender.
receiver_for_display varchar(50) NULL Display name of the receiver.
receiver_gea_account varchar(20) NULL Receiver's GEA account.
expense_vendor varchar(50) NULL Vendor for expense transactions.
purchase_method varchar(30) NULL Method used for the purchase.
recurring_trans_period varchar(15) NULL Recurring transaction period (if applicable).
expense_accounting_type varchar(50) NULL Type of accounting used for expenses.
revenue_accounting_type varchar(50) NULL Type of accounting used for revenue.
tran_processor varchar(50) NULL Processor of the transaction.
connected_brk_tran_name varchar(100) NULL Connected BRK transaction name.
aes_to_usd_rate float NULL AES (Authenticated Ecobrick Standard) to USD conversion rate.
aes_plastic_offset_purchase_kg decimal(10,2) NULL Plastic offset purchase in kilograms.
usd_payment_for_aes decimal(20,2) NULL USD payment made for AES.
gbp_payment_for_aes decimal(20,2) NULL GBP payment made for AES.
native_conversion_of_aes decimal(20,2) NULL Native currency conversion for AES.
brk_cost_of_aes_display varchar(100) NULL Display value of BRK (Brikcoin) cost for AES.
credited_catalyst varchar(255) NULL Credited catalyst for the transaction.
brikcoins_purchased_display varchar(20) NULL Display value of brikcoins purchased.
usd_paid_for_brk_+ccy_display varchar(30) NULL Display value of USD paid for BRK.
connected_brk_trans varchar(100) NULL Connected BRK transactions.
paymt_record_url varchar(255) NULL URL to the payment record.

Nomenclature note

In the GoBrik table we write table names with tb_ at the start of the table name (using a plural noun i.e. ecobricks, ecobrickers, etc) if it is only used on GoBrik. On the buwana database we add the _tb at the end of the name (using a plural nound i.e. users, countries, watershed, etc.). On the GoBrik database, if a table is mirrored on Buwana, we name it the same as on the Buwana database (i.e. communities_tb, languages_tb, countries_tb etc.)

Clone this wiki locally