Different exchange rates for same Sales order


I’m doing integration with portal from there sales order will create in AX.

Storing the data in staging table and creating sales order and doing auto post invoice through x++.

from portal they will send different Exchange rates for same sales order

For E.g: 1st line exchange rate is 3.5(USD)

2nd line exchange rate will be 4(USD)

Sales invoice posting calling from portal, so 1st sales header and line will create and invoice will post, after that 2nd line will invoice on click of a button in portal.

i have enabled setup in AR parameters/Updates/Use Exchange rate from source document and i’m passing exchange rate coming portal to sales order header field : fixed Exchange rate.

i tried to update the fixed exchange rate in sales header but its dividing it by 100

select forUpdate salesTable where salesTable.SalesId == ‘WLCONJ0001315408’;
salesTable.FixedExchRate = 2;

the result of the above code in sales header Fixed exchange rate field is : 0.02

Please suggest.

That is how it is displayed on form. The value at table level should be the one you updated.

Have a look at \Data Dictionary\Tables\SalesTable\Methods\editFixedExchRate

hi Kranthi,

thanks for the reply.

i have another question

I want to pass different exchange rate for sales invoice for markup trans.

Please suggest.

Do you mean the exchange rate for markup trans is different than the invoice?

1 Sales order - different invoice with different exchange rates .

Invoice is auto posting through X++, how to pass different exchange rate for each invoice?

1 more scenario there will be different currency for different invoice in same sales order.

Please suggest it will be great .

Is it just flipping the currency code? Are you not recalculating the amounts based on the new currency code?

You can change the currency code on sales order even after the sales order is partially invoiced. Try doing it manually and see what happens.

Amount also need to be calculated based on currecny

Try changing the currency code manually on a sales order and see what happens. You can try using the similar code in your case.