Discounts by Item Category Code

Hello all,

I am new i NAV and I m having troubles with Line Discount %.

I need to setup sales line discounts by Item Category Code.

So, In table 7004 Sales Line Discount I can setup discount based on Items or Item Discount Groups. I need to change the functionality to be able to setup discount based on Item Category also. I did the changes in Table 7004: add option in type field : Item Category and also in page 7004 I add the code to choose type: Item Category and Code- List of item Category code.

When I setup the Line Discount for an Item, f.ex: Item ->Line Discounts->Type::Item Category; Sales Type:Customer; Sales Code::10000;Code:Chair;Line Discount % ::8, I can’t get this Line Discount % in the New Sales Order I create for this Item.

Please can you advise me what should i do? Where should I change the functionality ?

Hi and welcome to DUG,

If you are new to NAV development, then this is surely not one of the first changes I would recommend. This i quite complex code. [emoticon:b5038b8386d240d3adfaf15c98300abc]

It’s not enough to change the table, you also need to change the codeunit which calculates the discount. Here you need to tell NAV the logic around the Item Category discount. Don’t remember the number here (have no NAV open). But it’s around 7000.

If you turn on the debugger and run it when you update a sales order line, then you will be able to follow exactly how it does, when it calculates the discount. My guess it doesn’t even look for your new discount type.