Hello Everyone,
I am trying to do something a bit complicated in my sales document, and having a lot of trouble making it work.
To know my quantity, the user inputs a number in a custom field (lets call it "amount"). I have an onModify code block that will take that amount, do some stuff with it, and take the resulting value and assign it to quantity. A decimal number.
Now, I started by having the user input the value in the quantity field, and put the real amount in the custom field, and multiply it with my unit price. This had the following issues:
- cannot calculate totals for the document
- issues with discounts
- plenty other issues i encountered
I tried another approach, the one cited before. I have the user fill in a custom field called amount, and put the correct decimal in quantity. But this also gives a lot of issues for BC.
- line amounts are not always being calculated
- document totals are not being calculated, or only sometimes
- other inconsistencies
The thing is, I also have automated lines where the amounts are calculated automatically (sum of other lines, etc).
I really feel like this is not the right approach for my quantities, and as long as those are not right, I will be stuck with my other "parts", like the automatically calculated lines, etc.
Can you guys give some input/ideas please?
Cheers
Sohail Ahmed
756
YUN ZHU
731
Super User 2025 Season 1
Mansi Soni
529