I have created the new field “Skonto” (code20) in some Sales Line-Tables (37,39,113,115,123) and added the onvalidatetrigger to calcuate discounts like ‘50%+10%’ (=55%), added this field also to the subforms (sales order subform ecc.), i will put it also in posted-lines-subform. In order to have the system to add this field to the output table when smth. is posted, do i have to change anything or is automatically copied the whole record?
Why?? Maybe I’m missing something, but this feature is fairly standard in the application. Take a look at the field “Line Discount Calculation” in the “Sales Setup” table. Lars Strøm Valsted ------------------------- Software development today is a race between the programmers trying to make better and more foolproof programs, and the universe trying to make bigger idiots. So far the universe is winning.
First of all thank you, Lars, also for the the other answers to my posts. its that the user when making e.g. a sales quote should be able to fill in 50 plus 20 % discount, this is first 50% discount, then from that amount another 20%, makes tot. -60%. i havent found this in the standard but im very new to navision. thanks
Martin, I may have misunderstood you - that has happened before The field I mentioned is used when you use Customer/Item discount together with Volume Discount. FOr example, if the customer is entitled to 30% C/I Disc. and 10% Vol. Disc. Now assume that the order is 1000 EUR, it vould be calculated like this (if the field is set to use multiplication method): Total 1000 30% disc 300 Net 700 10% disc. 70 Net total 630 Hoever, if the field was set to addition method, the 2 discounts would be added together, giving 40% discount and a Net total of 600. So, if this is what you are trying to acheive, then it is covered by the standard application. However, if it is something the user should type in every time, then it is something you must create yorself. Lars Strøm Valsted ------------------------- Software development today is a race between the programmers trying to make better and more foolproof programs, and the universe trying to make bigger idiots. So far the universe is winning.
Hi Martin, regarding your initial question if the info in the data in your field gets passed on to the posted table data… yes, if you use the same Field No. in these tables. The posting process uses TRANSFERFIELDS to “copy” Sales Header and Line to Posted Sales Header and Line. Nevertheless, special effects to G/L (via Table 81 G/L Journal) need to be coded by you (C80 and C12), depending on the exact necesities. But as Lars suggests, investigate first the standard, because your needs might already been solved… Saludos Nils