This topic contains 6 replies, has 0 voices, and was last updated by JMUnderwood 18 years, 2 months ago.
-
AuthorPosts
-
August 14, 2006 at 9:05 am #8854
JMUnderwoodWhat is the best way to return the Transaction totals (like Amount) along with other details from the Transaction Body? There is no “Transaction_Total” field in the “Transactions” table.
I want to return the same fields you’re able to easily do using a custom search on Transactions where Type = “Invoice” and Mainline = True.
I need to return the following columns for each invoice:
Inv#
Inv Date
Customer
Ship Date
Days Overdue
Inv Total
Amount Paid
Amount Remaining
I know I can get the Inv Total by a SUM(Amount) on the Transaction_Lines table joins with the Transactions table. But what’s the most efficient way to get all of the columns I need?
I assume NetSuite has this nailed, since it is routinely and quickly provided in a Transaction custom search. So, NetSuite, mind sharing your SQL code for this?
Thanks,
JMU
This is a cached copy. Click here to see the original post. -
August 19, 2006 at 5:14 pm #8855
JMUnderwoodRE: Best Method to Return Transactions Totals with SQL
Can anyone help on this?
TIA.
JMU
-
August 21, 2006 at 1:12 pm #8856
shanondinkRE: Best Method to Return Transactions Totals with SQL
JM,
Maybe the Amount field at TRANSACTION_LINES | TRANSACTION_LINE_ID = 0 will help.
From what I can tell, this is the total of the line items 1-x.
I might be all wrong but this seems to match on my 3 newest Invoices which is as far as I looked.
Seems funny on Item Fullfillments though.
Shanon
-
August 21, 2006 at 4:49 pm #8857
JMUnderwoodRE: Best Method to Return Transactions Totals with SQL
Originally posted by shanondink
Maybe the Amount field at TRANSACTION_LINES | TRANSACTION_LINE_ID = 0 will help.
Shannon,
I think you may be on to something.
Can someone from NetSuite please confirm this:
The data in the Transaction_Lines view for Transaction_Line_ID = 0 is:Amount — Transaction total as applied to the A/R ledger
Amount_Linked — Total amount paid to-date on this transaction
So, for Transaction_Line_ID = 0 the data is for the entire Transaction, not just one Item.TIA,
JMU
-
August 23, 2006 at 5:15 pm #8858
JMUnderwoodCan someone from NetSuite please confirm this?
Evan? Yang? Anyone?
I really need to move forward with this task, and I am hesitant to do so until my assumptions are confirmed.
TIA,
JMU
-
August 25, 2006 at 1:17 am #8859
yangThat is correct. For non journal entries, you can reliably get the total amount of the transaction by looking at the amount column in the transaction_lines row with transaction_line_id = 0.
Thanks,
Yang
-
August 25, 2006 at 6:31 am #8860
JMUnderwoodThanks for the confirmation Yang. Have a great day!
Best Regards,
JMU
-
AuthorPosts
You must be logged in to reply to this topic.