cancel
Showing results for 
Search instead for 
Did you mean: 

Last Evaluated Price Non-inventory item Formatted Search

LJT
Discoverer
0 Kudos
140

Hi all,

sorry if I missed another post asking the same question but I couldn't find any:

I have some items which are non-inventory items and therefore have no Last Evaluated Price. In the general settings, we chose the Last Evaluated Price as base price for the Gross Profit calculation.

The specific items I am talking about are things like Transport Insurance or 3rd Party Handling Fees. These are simply costs charged to the customer in exactly the amount we encounter them. Hence, I'd like the Gross Profit to be precisely 0%.

Now the question: Is there a possibility to automatically use the LineTotal as GrossBuyPr but only for those specific items? I tried it with a Formatted Search but it didn't work:

SELECT CASE WHEN T0.ItemCode = '#transport' THEN T0.LineTotal ELSE T0.GrossBuyPr END as GrossBuyPr
FROM INV1 T0
WHERE T0.LineNum = $[INV1.LineNum] and T0.DocEntry = $[INV1.DocEntry]

Most thankful for any help!

View Entire Topic
LoHa
Active Contributor
0 Kudos

Hi,

try this

SELECT CASE WHEN $[$38.1.0] = '#transport' THEN $[$38.21.0] ELSE $[$38.37.0] END as GrossBuyPr

regards Lothar

LJT
Discoverer
0 Kudos
That is awesome, Lothar. Thank you so much!