SELECT itd.* FROM "inv_tran_details" as itd inner join inventory_transactions as it on it.id = itd.inventory_transaction_id inner join item_with_details as iwd on itd.item_with_detail_id = iwd.id WHERE (it.reference2 = $1 and iwd.item_id = $2) ORDER BY it.id desc LIMIT $3
Total Time ms
Loading...
Average Time ms
Loading...
Calls
Loading...
Tables
Name |
Rows |
Indexes |
inv_tran_details |
5577140 |
-
id
PRIMARY
-
created_at
-
drug_prescription_detail_id
-
inventory_transaction_id
-
item_with_detail_id
-
quantity
-
updated_at
|
inventory_transactions |
1398783 |
-
id
PRIMARY
-
approved_date
-
created_at
-
created_by
-
extid
-
from_inventory_head_id
-
from_reference1
-
from_reference2
-
from_reference3
-
from_reference4
-
grn_approval_status
-
grn_id
-
inter_approved_date
-
invoice_date
-
invoice_number
-
is_with_invoice
-
reference1
-
reference2, from_inventory_head_id
-
reference2, to_inventory_head_id
-
reference3
-
reference4
-
status, from_reference1, transaction_date
-
sub_reference2
-
to_inventory_head_id
-
to_reference1
-
to_reference2
-
to_reference3
-
to_reference4
-
transaction_date
-
updated_at
-
updated_by
|
item_with_details |
337788 |
-
id
PRIMARY
-
actual_cost_price
-
batch_number
-
cost_price
-
created_at
-
created_by
-
dc_date
-
dc_no
-
discount_percentage
-
effective_cost_price
-
expiry_date
-
fare_market_value
-
general_account_id
-
item_id
-
manufacture_date
-
manufacturer_id
-
mg_status
-
mrp
-
output_tax_profile_id
-
purchase_expense_amount
-
reference1
-
selling_price
-
status
-
supplier_id
-
tax_amount
-
tax_on_flag
-
tax_profile_id
-
updated_at
-
updated_by
|