Transaction lines

Back to list of main tables

Table name is trans_line. Contains the lines that belong to transactions.

Field name	Description	mSupply Use	Reference link	Type	Indexed
batch	The batch of the item received or issued	Supplier invoice/Inventory adjust-add stock»New line»batch	https://docs.msupply.org.nz/receiving_goods:supplier_invoices#adding_new_lines_to_a_supplier_invoice also used to display on Customer invoice https://docs.msupply.org.nz/issuing_goods:issuing_goods_customer_invoice#summary_by_batch_tab	Text
box_number	The box ID or ID's that the item has been packed to for distribution purposes	Text
cost_price	The cost of the item in local currency during purchase	Supplier invoice/Inventory adjust-add stock»New line»Cost price	Real
donor_id	This is used if stock receipt and distribution is to be tracked by donors.	Alpha	*
expiry_date	The expiry date of this line on the invoice	Date
foreign_currency_price	While purchasing, this field is used to log cost of items in suppliers foreign currency.	Real
goods_received_lines_ID	This field is filled if the stock came via mSupply's ordering system	Alpha	*
ID	Internal tracking number used by mSupply	Alpha	*
is_from_inventory_adjustment	True if the item was added or removed via the stock take module	Boolean
item_ID	Key of the item to which it belongs	Alpha	*
item_line_ID	The key of the item line (stock line) that the transaction line belongs to	Alpha	*
item_name	The item name (stored to give data integrity for historical transactions even if the related item name is later changed)	Supplier/Cusomer invoice»New line»Item	Alpha
line_number	The sequential line number on the invoice	Supplier/Customer invoice»Line»	Long Integer
linked_transact_id	Stores the id of a transaction being paid	Alpha
local_charge_line_total	Field to account for local freight or custom cost when receiving stock.	Real
location_ID	Used to assign stock to location or for stock picking purposes.	Alpha	*
manufacturer_ID	Used to specify the manufacturer of the batch.	Alpha
note	Note or directions if a dispensary line	Also used in Supplier invoice»New line»Comment	Text
order_lines_ID	Stores the Order line ID if the stock was received via mSupply's ordering system.	Alpha	*
pack_inners_in_outer	Long Integer
pack_size	The number of items in a carton.	Supplier/Customer invoice»New line»Pack size	Real
pack_size_inner	Long Integer
price_extension	Total cost price or sell price for the line.	Supplier/Customer invoice»New line»Cost price	Real
quantity	Quantity issued (in number of packs)	Supplier invoice»New line»Received quantity Customer invoice»New line»Quan	Real
repeat_ID	In dispensary mode, patients may be called to repeat prescriptions.	Alpha	*
sell_price	The sell price for a single packsize.	Supplier invoice/Inventory adjust-add stock»New line»Sell price	Real
source_backorder_id	Used if customer backorders are being full-filled.	Alpha
supp_trans_line_ID_ns	Used if customer Non stock items orders are being issued.	Alpha
transaction_ID	Key of the transaction to which it belongs	Long	*
user_1	Custom field	Alpha
user_2	Custom field	Alpha
user_3	Custom field	Alpha
user_4	Custom field	Alpha
volume_per_pack	Volume for a single packsize in m3	Real
Weight	The total weight for this line (NOT for each item)	Supplier invoice/Inventory adjust-add stock»New line»Weight per pack	Real
type	The type of the transaction line “stock_out” for all CIs, SCs, the issue line on a repack which is the first line of a repack “stock_in” for all CCs, SIs, the received line(s) on a repack which are all other lines of a repack “placeholder” for all placeholder lines which, in previous versions of mSupply, were all lines of table [trans_line] that had a Neg ID's in field [trans_line]item_line_ID. “cash_in” for cash receipts “cash_out” for cash payments “non_stock” for non-stock transactions on customer invoices “service” for service items	Alpha
user_5_ID	The ID of the custom field 5 record selected for this transaction line.	Alpha	*
user_6_ID	The ID of the custom field 6 record selected for this transaction line.	Alpha	*
user_7_ID	The ID of the custom field 7 record selected for this transaction line.	Alpha	*
user_8_ID	The ID of the custom field 8 record selected for this transaction line.	Alpha	*
linked_trans_line_ID	Links this transaction line to another transaction line (used for reversals, repacks, or related lines).	Alpha
barcodeID	Stores the barcode identifier associated with the issued or received item.	Alpha	*
sentQuantity	Quantity actually sent (may differ from ordered quantity).	Real
optionID	Stores the option or variant identifier related to this transaction line.	Alpha
isVVMPassed	Indicates whether the Vaccine Vial Monitor (VVM) check has passed.	Alpha
program_ID	Program identifier related to the transaction line (deprecated – previously used to track doses).	Alpha
prescribedQuantity	Quantity prescribed (used mainly in dispensary workflows).	Real
vaccine_vial_monitor_status_ID	VVM status recorded when receiving stock; applied to the underlying item line once finalised.	ID are not used in UI but used to display Supplier invoice/Inventory adjust-add stock»New line»VVM status	Alpha
sent_pack_size	Pack size used when sending stock.	Real
custom_data	Stores structured or custom data related to the transaction line.	Object
medicine_administrator_ID	Identifier of the person or entity that administered the medicine.	Alpha
om_item_code	External OMS item code.	Alpha
om_tax	Tax amount applied from OMS integration.	Real
om_total_before_tax	Total amount before tax from OMS integration.	Real
om_total_after_tax	Total amount after tax from OMS integration.	Real
om_item_variant_id	OMS item variant identifier.	Alpha
spare_text	Spare text field for future or ad-hoc use.	Alpha
oms_fields	Stores OMS-specific structured data.	Object