You should avoid using a cursor for this - remember SQL Server is set based.
Your instructions don't really make much sense - for example you would not use currency exchange values just on negative values. I think what you mean is that you want the amounts in USD.
This also smacks a little of homework so what follows is not a complete solution - besides my initial comment above applies.
I used the following test data
declare @invoice_dump table (InvoiceNo int, currency varchar(4), Amount decimal(15,2))
declare @currency_exchange_value table (FromCurrency varchar(4), ToCurrency varchar(4), ExchangeValue decimal(15,4))
insert into @invoice_dump (InvoiceNo, currency, Amount) values
(5257,'USD',9450.00),(5257,'INR',-35212.32)
insert into @currency_exchange_value (FromCurrency,ToCurrency,ExchangeValue) values
('INR','USD',0.2666)
Note I couldn't really establish what you meant in your comments about duplicates so I have not catered for them explicitly.
This sql snippet
SELECT *, ABS(Amount) as posValue
FROM @invoice_dump I
LEFT OUTER JOIN @currency_exchange_value C ON I.currency = C.FromCurrency
Gives these results
InvoiceNo currency Amount FromCurrency ToCurrency ExchangeValue posValue
5257 USD 9450.00 NULL NULL NULL 9450.00
5257 INR -35212.32 INR USD 0.2666 35212.32
Note 1 - The ABS() function will give the absolute value of the column - effectively changing a negative value into a positive one
Note 2 - Example of using a join to get the exchange value.
The problem now is that we have two rows but we want the data from both... the best way to handle that is to use PIVOT e.g.
SELECT * FROM
(SELECT *, ABS(Amount) as posValue
FROM @invoice_dump I
LEFT OUTER JOIN @currency_exchange_value C ON I.currency = C.FromCurrency
) src
PIVOT
(
SUM(Amount) FOR currency IN (USD, INR)
)pvt
Note 3 - Notice that the currency is now a column name
That gives the result
5257 NULL NULL NULL 9450.00 9450.00 NULL
5257 INR USD 0.2666 35212.32 NULL -35212.32
so I obviously haven't got that quite right ... I need a single row per invoice so I am going to use GROUP BY
SELECT InvoiceNo, MAX(FromCurrency) as FromCurrency, MAX(ToCurrency) as ToCurrency,
MAX(ExchangeValue) as ExchangeValue, MAX(USD) as USD, MAX(INR) as INR
FROM
(SELECT *, ABS(Amount) as posValue
FROM @invoice_dump I
LEFT OUTER JOIN @currency_exchange_value C ON I.currency = C.FromCurrency
) src
PIVOT
(
SUM(Amount) FOR currency IN (USD, INR)
)pvt
GROUP BY InvoiceN
Which gives the results
InvoiceNo FromCurrency ToCurrency ExchangeValue USD INR
5257 INR USD 0.2666 9450.00 -35212.32
Now that you have all the results in a single row you could add those to a temporary table or use a Common Table Expression or even plug in your simple equation.