tables_fields:main_tables:transaction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tables_fields:main_tables:transaction [2022/07/12 23:41] Dhanyatables_fields:main_tables:transaction [2026/01/21 10:05] (current) Raksha Khadka
Line 4: Line 4:
 Table name is transact. Transactions are customer invoices, supplier invoices, inventory adjustments, customer credits, supplier credits, repacks etc. Table name is transact. Transactions are customer invoices, supplier invoices, inventory adjustments, customer credits, supplier credits, repacks etc.
  
-^ Field name               ^ Description                                                                                     ^ Type    ^ Ind  +^ Field name ^ Description       ^ mSupply Use     ^ Reference link   ^ Type    Indexed 
-| **name_ID** | UUID of the name (customer/supplier) associated with the transaction (if any)  |UUID    +| **name_ID** | UUID of the name (customer/supplier) associated with the transaction (if any)| Usally not ID are not used in UI but used to display Customer/supplier/prescription invoice>>name | https://docs.msupply.org.nz/issuing_goods:issuing_goods_customer_invoice#name | Alpha | * | 
-| **ID** | UUID of the transaction (not usually visible to the user   UUID     +| **ID** | UUID of the transaction (not usually visible to the user | Not use in UI | | Alpha | * | 
-| **invoice_num**         | Invoice number given by mSupply                                                                  | Long                +| **invoice_num** | Invoice number given by mSupply | Customer/Supplier/Prescription invoice>>Invoice | | Long Integer | * | 
-| amount_outstanding      | The amount remaining to be paid by the supplier or customer (zero if payments module is not activated).| Real                 +| amount_outstanding | The amount remaining to be paid by the supplier or customer (zero if payments module is not activated).| Prescription>>Amount Outstanding | | Real | | 
-| arrival_date_estimated  | Estimated date goods will reach facility to supply/customer  -only applies to type "CI| Date                 +| arrival_date_estimated | Estimated date goods will reach facility to supply/customer -only applies to type CI” | Customer invoice>>Transport details tab>>Expected arrival date | | Date | | 
-| arrival_date_actual     | Actual date goods reached facility to supply/customer  -only applies to type "CI         | Date                 +| arrival_date_actual | Actual date goods reached facility to supply/customer -only applies to type CI” | Customer invoice>>Transport details tab>>Actual arrival date | | Date | | 
-| budget_period_ID        | The ID of the budget period the transaction is assigned to (may be different to logical period from transact.date | Long                 +| budget_period_ID | The ID of the budget period the transaction is assigned to (may be different to logical period from transact.date | | | Alpha | 
-| category_ID             | The ID of the category of the transaction                                                                 Long             +| category_ID | The ID of the category of the transaction | Supplier/Customer/Build/Repack/Prescription invoice>>Category | https://docs.msupply.org.nz/issuing_goods:issuing_goods_customer_invoice#category | Alpha | * | 
-| comment                 | The comment text entered by the user                                                                 | Text        +| comment | The comment text entered by the user | | | Text | | 
-colour                  | The colour assigned to the transaction (longint version of hex RGB)                                                        | Long            +Colour | The colour assigned to the transaction (longint version of hex RGB) | | | Long Integer | | 
-| confirm_date            | The date the invoice was confirmed                                                                   | Date          +| confirm_date | The date the invoice was confirmed | | | Date | * | 
-| confirm_time            | The time the invoice was confirmed                                                                   | Time          +| confirm_time | The time the invoice was confirmed | | | Time | * | 
-contact_ID              | The ID of the contact associated with this transaction                                                                   UUID          +contact_id | The ID of the contact associated with this transaction | Not used in UI but used to display Customer invoice>>Transport details tab>>Shipped to | | Alpha | * | 
-| currency_ID             | The ID of the currency of the transaction                                                                   String 20           +| currency_ID | The ID of the currency of the transaction | | | Alpha | |  
-| currency_rate           | The currency rate of the transaction                                                                   | Real           +| currency_rate | The currency rate of the transaction | If the store pref is on to issue in foreign currency Customer invoice>>Currency rate | | Real | |  
-cust_transaction_ID     | The ID of the associated customer invoice if there is one (for stock transfers)           Long           +linked_transaction_id | The ID of the associated customer invoice if there is one (for stock transfers)| | | Alpha| |  
-| date_order_received     | Date the requistion/order was received from customer/facility to supply -only applies to type "CI     | Date                 +| date_order_received | Date the requistion/order was received from customer/facility to supply -only applies to type CI” | Customer invoice>>Transport details tab>>Order received date | | Date | | 
-| date_order_written      | Date the requistion/order was created by the customer/facility to supply  -only applies to type "CI| Date                 +| date_order_written | Date the requistion/order was created by the customer/facility to supply -only applies to type CI” | Customer invoice>>Transport details tab>>Order written date | | Date | | 
-| donor_default_ID        | The ID of the donor to assign to transaction_lines as they are created                               UUID             +| donor_default_ID | The ID of the donor to assign to transaction_lines as they are created | | | Alpha | |  
-| encounter_id            | The id of the HIS encounter. Related: HIS.encounter_id                                 UUID         +| encounter_id | The id of the HIS encounter. Related: HIS.encounter_id  | | | Alpha | 
-| entry_date              | The date the transaction was created  | Date             +| entry_date | The date the transaction was created | Customer/Supplier/Prescription invoice>>Entry date | | Date | |  
-| export_batch            | The batch number supplied by mSupply when the invoice was finalised. | Long               +| export_batch | The batch number supplied by mSupply when the invoice was finalised. | | | Long Integer | | 
-| foreign_currency_total  | Total in currency of the supplier/customer                                              real           +| foreign_currency_total | Total in currency of the supplier/customer | | | Real | 
-| goods_received_ID       | The ID of the goods receipt that generated this transactions- applies to type "SIonly            UUID          +| goods_received_ID | The ID of the goods receipt that generated this transactions- applies to type SI” only | | | Alpha | * | 
-| hold                    | If true, the transaction status can not be changed, stopping putting goods in or out of stock, or finalising an invoice  | Boolean           +| hold | If true, the transaction status can not be changed, stopping putting goods in or out of stock, or finalising an invoice | Supplier/Customer Invoice>>Hold | https://docs.msupply.org.nz/issuing_goods:issuing_goods_customer_invoice#hold |Boolean | | 
-| invoice_printed_date    | Date the invoice was first printed (invoices are printed once status is "CN- only for type "CI" | Date       +| invoice_printed_date | Date the invoice was first printed (invoices are printed once status is CN” - only for type CI| | | Date | | 
-| is_authorised           | True if transaction has been authorised  Booelan           +| is_authorised | True if transaction has been authorised | Need to set in store preference Supplier/Customer Invoice>>Authorised | | Boolean | | 
-| is_cancellation  | True if the transaction is a cancellation of an existing transaction (i.e. a contra) | Long    +| is_cancellation | True if the transaction is a cancellation of an existing transaction (i.e. a contra) | | | Boolean | 
-| local_charge_distributed | Any charges locally applied to a receipt transaction (used to calculate costs-included selling price) | Real           +| local_charge_distributed | Any charges locally applied to a receipt transaction (used to calculate costs-included selling price) | | | Real | | 
-| linked_goods_received_ID | The ID of the goods received note created from a customer invoice in an internal requisition | Alpha 255         +| linked_goods_received_ID | The ID of the goods received note created from a customer invoice in an internal requisition | | | Alpha | * | 
-mode_ID                 | 0 for store, 1 for dispensary               Long           +mode | 0 for store, 1 for dispensary | | | Alpha | 
-| mwks_sequence_num       | The id of the corresponding transaction in Moneyworks   | Long                 +| mwks_sequence_num | The id of the corresponding transaction in Moneyworks | | | Long Integer | | 
-| number_of_cartons       | Number of cartons the order was shipped in   | Long                 +| number_of_cartons | Number of cartons the order was shipped in | | | Long Integer | | 
-original_PO_id          | The ID of the Purchase Order that generated this transaction  Long     +original_PO_ID | The ID of the Purchase Order that generated this transaction | | | Alpha | * | 
-| requisition_ID  | ID requisition that this transaction was created from \\ (Only applies to customer invoices. New field from version 3.6)   UUID       +| requisition_ID | ID requisition that this transaction was created from (Only applies to customer invoices. New field from version 3.6)| | | Alpha | 
-| responsible_officer_ID  | ID of the user responsible for shipping goods  UUID                 +| responsible_officer_ID | ID of the user responsible for shipping goods | Not used in UI but used to display Customer invoice>>Transport details tab>>Responsible officer | | Alpha | | 
-| pickslip_printed_date   | Date of first pickslip printing (not updated with subsequent printing)  | Date |      +| pickslip_printed_date | Date of first pickslip printing (not updated with subsequent printing)| | | Date | | 
-| prescriber_ID           | ID of the prescriber (for prescriptions)                                       UUID     +| prescriber_ID | ID of the prescriber (for prescriptions) | | | Alpha | * | 
-| ship_date | Date the order was shipped (for type "CI"                                    | Date                 +| ship_date | Date the order was shipped (for type CI| Customer invoice>>Transport details tab>>Ship date | https://docs.msupply.org.nz/issuing_goods:issuing_goods_customer_invoice#order_tracking_data | Date | | 
-| ship_method_comment      | Alpha   80           +| ship_method_comment | | | | Alpha | | 
-| ship_method_ID           UUID                 +| ship_method_ID | ID of Shipping method Not used in UI but used to display Customer invoice>>Transport details tab>>Ship method | https://docs.msupply.org.nz/issuing_goods:issuing_goods_customer_invoice#shipping_method | Alpha | | 
-| **status**              | A 2 letter code denoting the status of the transaction. See [[other_stuff:transaction_status_codes|Transaction Codes]]  | Alpha 3            +|**status** | A 2 letter code denoting the status of the transaction. See [[other_stuff:transaction_status_codes|Transaction Codes]] | Customer/supplier invoice>>Status | https://docs.msupply.org.nz/receiving_goods:supplier_invoices#buttons_in_the_supplier_invoice_window | Alpha | | 
-| subtotal  | The subtotal of transaction lines plus extra charges excluding tax | Real    +| subtotal | The subtotal of transaction lines plus extra charges excluding tax | Customer/supplier/prescription invoice>>Subtotal | https://docs.msupply.org.nz/receiving_goods:supplier_invoices#general_tab | Real | | 
-| tax  | Tax (value) on the subtotal  | Real     +| tax | Tax (value) on the subtotal | Customer/supplier/prescription invoice>>% Tax | https://docs.msupply.org.nz/receiving_goods:supplier_invoices#general_tab | Real | | 
-| **type**                | The transaction type. See [[other_stuff:transaction_status_codes|Transaction Types here]]                                          | Alpha 3            +|**type** | The transaction type. See Transaction Types here | | | Alpha | | 
-| **total**               | The subtotal plus the tax amount (see below)  | Real               +|**total** | The subtotal plus the tax amount (see below) | Customer/supplier/prescription invoice>>Subtotal | https://docs.msupply.org.nz/receiving_goods:supplier_invoices#general_tab | Real | | 
-| their_ref               | The reference supplied by the other party for the transaction  | Alpha 80           +| their_ref | The reference supplied by the other party for the transaction | Customer/supplier/prescription invoice>>Their ref | | Alpha | | 
-| service_descrip         | Description of any service items on the invoice  | Alpha 60           +| service_descrip | Description of any service items on the invoice | Customer/supplier/prescription invoice>>Item | https://docs.msupply.org.nz/receiving_goods:supplier_invoices#general_tab | Alpha | | 
-| service_price           | The amount of any extra charges added to the invoice (or discount)  Real    | +| service_price | The amount of any extra charges added to the invoice (or discount) | Customer/supplier/prescription invoice>>Amount https://docs.msupply.org.nz/receiving_goods:supplier_invoices#general_tab | Real | | 
-| subtotal                | Total of all price extensions plus the service price  | Real                 | +| user_ID | The user id number of the user who created the invoice | | | Alpha | 
-| tax                     | The tax amount of the invoice  | Real            |      +| user1 | Custom user-defined field | | | Alpha | | 
-| user_ID                 | The user id number of the user who created the invoice                                               UUID                 +| user2 | Custom user-defined field | | | Alpha | | 
-| user1                         | Alpha   50           +| user3 | Custom user-defined field | | | Alpha | | 
-| user2                       | Alpha   50           +| user4 | Custom user-defined field | | | Alpha | | 
-| user3                    | Alpha   50           +| waybill_number | | | | Alpha | | 
-| user4                    | Alpha   50           +| entry_time | The time of invoice entry | | | Time | | 
-| waybill_number   | Alpha   50           +| authorisationStatus | Detailed authorisation state | | | Alpha | | 
 +| nameInsuranceJoinID | Links patient and insurance record. | | | Alpha | | 
 +| insuranceDiscountAmount | Calculated insurance discount value | Prescription>>N% Discount(N=insurance discount rate) | |Real | | 
 +| optionID | | | | Alpha | * | 
 +| insuranceDiscountRate | Insurance discount percentage | | | Real | | 
 +| internalData | | | | Object | | 
 +| lastModifiedAt | | | | Long Integer | | 
 +| custom_data | | | | Object | | 
 +| goodsReceivedConfirmation | | | | Object | | 
 +| paymentTypeID | | | | Alpha | | 
 +| diagnosis_ID | Diagnosis associated with the prescription. | | | Alpha | * | 
 +| wardID | | | | Alpha | | 
 +| category2_ID | | | | Alpha | | 
 +| om_created_datetime | | | | Alpha | | 
 +| om_allocated_datetime | | | | Alpha | | 
 +| om_picked_datetime | | | | Alpha | | 
 +| om_shipped_datetime | | | | Alpha | | 
 +| om_delivered_datetime | | | | Alpha | | 
 +| om_verified_datetime | | | | Alpha | | 
 +| om_status | | | | Alpha | | 
 +| om_colour | | | | Alpha | | 
 +| om_type | | | | Alpha | | 
 +| om_transport_reference | | | | Alpha | | 
 +| finalised_date | | | | Date | | 
 +| programID | ID of program that link to the invoice | | | Alpha | * | 
 +| tax_rate | | | | Real | | 
 +| gender | Patient gender | | | Text | |  
 +| om_original_shipment_id | | | | Alpha | | 
 +| finalised_time | The time of finalise invoice | | | Time | |  
 +| om_expected_delivery_datetime | | | | Alpha | | 
 +| oms_fields | | | | Object | | 
 +| om_gender | | | | Alpha | |
 ---- struct data ---- ---- struct data ----
 pagestatus.status    :  pagestatus.status    : 
 ---- ----
  
  • Last modified: 2026/01/21 10:05
  • by Raksha Khadka