cancel
Showing results for 
Search instead for 
Did you mean: 

Getting negative value of discount on adding ar draft through DIAPI 's

Former Member
0 Kudos

Hi

I am facing a scenario where in if I am creating the AR -draft for 1 day order through DIAPI's ADD method ,The sales invoice draft that gets created shows discount =some decimal value that on rounding off is equivalent to 10 in case 10% discount is given on order at line level.

and in case i have made draft for an order having period more than 1 day then the discount values gets negative.

For each line I am assigning the discount value in following ways:

oDraft.Lines.DiscountPercent = 10

then the draft that gets created shows me

discount%= 9.125 in case I have 1 day period

and

discount%= -400 in case I have period of more tahn 1 day.

I am not understanding why is it so .I mean on what values the discount on AR - invoice draft calulation actually depends.

why is it showing me decimal amount when i am assiging a roundoff value of 10 .

and why is it making discount negative.

Please help me out as early as possible.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

Can u post the coding.