-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicated currencies in PTAX form #19
Comments
Hi @sauloguerra Thanks for reporting this problem and file this issue. |
The PTAX form presents more than one currency id for the same currency. For a few currencies (like MXN) the incorrect currency was being selected. I implemented a workaround that gets the highest id. This solution doesn't close this BUG, but for the great majority of currencies it works. issue #19
@sauloguerra I implemented a workaround and I guess that will work with the major currencies. I was studying the API and I have seen that it won't solve this particular issue. I am closing a new release by the end of this week so I guess this fix will be available on CRAN in the next week. thanks. |
Hello,
First of all congratulations for the package, it's excellent!
I was using the package to retrieve time series for all currencies in a loop, and I noticed that there is a problem when it comes to querying certain currencies.
The function uses the PTAX forms and the select reference (ChkMoeda) to perform the query. The problem: there are, for some 3 letter ISO codes of the currency, more than one reference in the form list for the same currency.
Exemplifying, the following query does not quote for the period, even if there is some data in the PTAX:
There are two references to PESO MEXICO in the form (I imagine an old one - no / in the text - that does not work and a recent one - with / in the text - that works), and I believe that when the parser is being made to translate 'MXN' for ChkMoeda from Mexico is catching the very first entry of PESO MEXICO (no /) that does not work. If you try the PTAX form with PESO/MEXICO, it works.
It seems to me that some adjustment in the following function would solve the question:
I did some workarounds but it's not cool to propose as a solution. Once I get a better time window I can make a proposal for improvement!
Thanks again for the package!
The text was updated successfully, but these errors were encountered: