This content has been marked as final. Show 2 replies
I have to make a hard coded correction in our loading script to get proper values in a certain situation.
Now I've written the following script where Document No_ 1234 has a value of circa -200.000:
"Document No_" as [Invoice Number],
num(date(42735, 'DD-MM-YYYY')) as %key_Date,
Amount * -1 as [Nett Amount],
(Amount * -1) + num(10000) as [Nett Amount new],
99999 as [%keyBill-to-Customer],
1 as [Currency Factor],
'Actual' as [Scenario]
FROM [my location]
WHERE MATCH([Document No_], '1234');
The Amount is a given value retrieved from a database (-200.000 in this case) and a positive correction of 10.000 should be made by a simple sum. When I have a look at the result of the sum to get the Nett Amount new, the result is 40.000 where it should be -190.000.
I'm obviously making a foolish mistake, but it would be great if you guys could explain how to do such an easy sum in the loading script.