Xero API GetReportsListAsync - more than one matching element error - xero-api

When calling GetReportsListAsync from my Xero App for a Tennant I'm getting the InnerException "Sequence contains more than one matching element".
I used Xero's API Explorer to call the same Xero Accounting API > Reports Endpoint > Get Reports List Operation for the same Tennant and can see that there is a double-up of the same GST Calculation (ReportType) Activity Statement (ReportName) for the same period of 1 Jan 2022 to 31 Jan 2022 (ReportDate).
How can there be 2 of the same reports for the same Tennant for the same period? Which is the correct one so I can take the ReportID to then call GetReportFromId?
Any help greatly appreciated.

Related

Show the error message only once in SAP HCM Payroll?

I am doing some changes related to error messages in HCM Payroll.
I put the message into a table and call them and this works fine.
But now I'd like to supress this error message once it has been showed in past periods of the payroll.
Example: payroll of june 2022 triggers an error message. Then when I have payroll of july this message will be showed again and this has to be blocked. Once the message has been showed in a past payroll period it should not be showed anymore.
code:
WHEN 'E27'.
PERFORM append_line TABLES gt_error
USING 'This amount'.
PERFORM append_line TABLES gt_error
USING 'is over the limit'.
The error message 27 has been showed in a past period it should not be showed again.

How to filter the response via API

Wanted to know if this is possible, I have 2 APIs I am testing.
API 1. Gives a list of total jobs posted by the user.
Response =
"jobId": 15596, "jobTitle": "PHP developer"
API 2. Gives the following response.
"total CVs": 19, "0-7days": 12,"status": "New Resume"
meaning in bucket New resume we have a total of 19 CVs and in 19 Cvs 12 Cvs have an aging of 12 days. This response basically related to the jobs posted.
When i Hit the API i am getting the correct numbers but on front end the API 1 will be used as dropdown to select the jobs and then New Resume, ageing and total Cvs will be shown according to that jobs.
I wanted is it possible to test the two API's togther sort of using filter like on front end or the only way to test is to check if the response i am getting is correct.

Mediawiki API - Throwing error getting previous date

I am new in this api which is MediaWiki web service API.
I am trying to pull data in above table of this url: https://lessonslearned.em.se.com/lessons/Main_Page
I'm testing it using its sandbox: https://lessonslearned.em.se.com/lessons/Special:ApiSandbox
Now, I can view the source of the page for example:
{{#ask:[[Category:Lesson]][[Has region::NAM]][[Creation date::>{{#time: r | -1 year}}]]|format=count}}
Above code should return lessons from NAM 12 months ago which has a value of 1 based on the table. But I am getting an error in this part [[Creation date::>{{#time: r | -1 year}}]].
Error message:{ "error": { "query": [ "\"Thu, 31 Mar 2022 03:50:49 +0000 -1 03202233103\" contains an extrinsic dash or other characters that are invalid for a date interpretation." ] } }
I tried to break the code in each part and found out that the root cause is the hyphen(-) in -1 year. I also check the documentation of the time parser function(https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##time) and they have samples similar to this, But in my case it is not working.
Hope someone can give me at least reference for this problem. Thanks!

Some errors while changing default currency in odoo 10.0...

How to change the default currency in Odoo 10.0 without exchange rate ?
I tried the method from http://www.surekhatech.com/blog/change-currency-in-pos-in-odoo-10
But I got the errors such as
When in POS, I tried to "Validate Closing & Post Entries", I got Odoo warning There is no account defined on the journal Cash for Profit involved in a cash difference and can not post the POS transaction.
While in POS checkout, the unsolved problems on https://www.odoo.com/forum/help-1/question/10-0-a-transaction-can-t-have-a-0-amount-none-error-on-validate-odoo-pos-payment-121554
How to fix them ?
I also includeed the recorded screen on youtube at : https://youtu.be/IahubLwnDDE
In solution of your 1st error you need to define opening and closing account in payment methods define in POS front. For that POS >> Configuraion >> Payment Methods. In that choose payment method which active in POS and from that there are 2 fields name "Default Debit Account" and "Default Credit Account" define accounts here. By adding accounts here your 1st error is resolved. Don't know much about second error if you know then late me know. :)

Rally: Reopened Defects Report

I am working on creating a report which contains "Defect ID, Defect Name, Creation Date and current state" of the reopened defects. This means all defects that had the state of reopened at some point during the defect cycle, the only way to find if the defect has ever been in reopened state is from the defects revision history.
There isn't any report in Rally that currently supports this. If anyone can help us on how to create one or give us an similar example that would be great.
If you hit the new Lookback API (unreleased when Kyle first answered, now in open preview), you can query directly for snapshots (revisions) where the State was ever set to a value "Reopened". Alternatively, you can look for any instance where OpenedDate changed by querying for "_PreviousValues.OpenedDate": {$exists: true}.
You can find information on the LBAPI here. There is support for querying it in the App SDK 2.0's SnapshotStore. Note that SDK 2.0p6 (releasing soon) has some improvements.
I would use the Defects by Closer App as a starting point. It performs a similar function by searching through the revision history for who closed a defect. You should be able to modify is slightly to search the revision text for "OPENED DATE changed" rather than "CLOSED DATE added":
for (j = 0; j < defect.RevisionHistory.Revisions.length; j++) {
var revision = defect.RevisionHistory.Revisions[j];
if (revision.Description.search("OPENED DATE changed") !== -1) {
//Found a reopened defect
}
}
For reference here is an example revision history entry from a reopened defect:
OPENED DATE changed from [Fri Jan 27 07:50:36 EST 2012] to [Fri Jan 27 07:51:00 EST 2012], STATE changed from [Closed] to [Open], CLOSED DATE removed [Fri Jan 27 07:50:50 EST 2012]
For more information on writing apps check out the App SDK documentation on Rally's Developer Portal.
NOTE: You can view the source code for Defects by Closer app here