And have a table with costs history of each article, with this fields:
Article FromDate ToDate Cost
I can't find a way to add a cost to each article in the invoice table, taking the valid cost at the moment of the creation of that invoice. This means that (CreationDate >= FromDate AND CreationDate <= ToDate), because each article can have many records in CostHistory table (no overlapping of date is allowed).
Hi, Put in Cost as I told you, now you have a mapping table. You can now use this table with applymap and "put" in your cost into your Invoice table. Now create a key with combination Item & Date, use this in a Mapping Load.
And then map the cost into your Invoice table with the same combination.