Sales Invoicing elements analytical distribution

Hello good neighbors of Sage City,

I have a case where, for a direct type interco sale invoice, we need to "ventilate" and percentage type invoicing element on multiple analytical dimensions for multiple item lines. Let me try to explain a bit better.

On a "direct" type interco sale invoice, we have the following invoicing element:

Element "Surch Diesel" is a diesel fuel surchange percentage added for/on each product lines.

The rate may vary based on fuel prices.

We have the following product lines and their individual analytical dimensions that represent de "department" (AX1) and the "equipment" (AX3) use to deliver the product. 

This combination of invoicing element and dimensions gives us the following invoicing element "valuation".

You can see that the monetary amount is "distibuted" to only one "department" and one "equipement".

We would like to see that monetary amount distributed "prorata" to all "equipement" dimensions. Meaning that:

Line 1 - (Qty x Net price) x 60% = x$ invoice element -> (10 x 17.30) x 60% = 103.80$ hitting dimensions 71 and 19-01

Line 2 - (Qty x Net price) x 60% = x$ invoice element -> (120 x 17.30) x 60% = 207.60$ hitting dimensions 71 and 22-01

And so on...

I tried creating new Auto journal lines to SIHI with:

Line type formula F:SID DDTANOT(0) <> 0

Linking table SFOOTINV Adding sales footer accounting codes with formula F:SID DDTANUM(0)

In the "formula" tab adding formula F:SID DDTANOT(0) to line 13 & 30

Repeating these steps 8 more times to covert all possible invoicing elements and finally set the normal Sales footer lines (60, 70, 80, 90, 100, etc.) to not post these amounts in summary with formula find (F:SVF DTA,7,8,9,10) = 0

 

But it still does not work! I'm out of avenues and imagination! Can any of you lend a Sage Partner a hand?

Thanks, Martin