Skip to content
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

Not creating new expense accounts or relating to existing ones #20

Open
shrippen opened this issue Feb 2, 2024 · 7 comments
Open

Not creating new expense accounts or relating to existing ones #20

shrippen opened this issue Feb 2, 2024 · 7 comments

Comments

@shrippen
Copy link

shrippen commented Feb 2, 2024

Hi,
using the new 0.3.3 I am able to pull and push my paypal data. Unfortunately the firefly_expense_id is either 0 or NULL in the sqlite. Where and when does the importer try to match "name" and firefly_expense_id?

This also applies to income accounts when there is a refund.

@robvankeilegom
Copy link
Owner

@shrippen Can you send me the event_codes for a transaction linked to the payer where you expect the firefly_expense_id to be filled in? This can be multiple transaction records for a single transaction if there's a currency conversion.

Here is an example:
image

As you can see there's one main record with the payer_id entered, and 3 sub records where the reference_id is equal to the pp_id on the main record. These 4 records in the transactions table are a single transaction in PayPal.

If there's anything unclear, lmk!

@shrippen
Copy link
Author

shrippen commented Feb 2, 2024

image

image

I hope this is helpful

@shrippen
Copy link
Author

Any news on this?

robvankeilegom added a commit that referenced this issue Mar 6, 2024
@robvankeilegom
Copy link
Owner

@shrippen I'm not sure what's going on. There might be an issue where Firefly returns an error that wasn't caught. I made some changes in 0.3.4, can you try again? You'll have to set the 0 values to null manually first or delete the database and start from scratch.

@shrippen
Copy link
Author

shrippen commented Mar 7, 2024

Now we have some new information. When running sync:firefly I get the following error:

Client error: POST http://firefly_app:8080/api/v1/accounts resulted in a 422 Unprocessable Content response:
{"message":"Dieser Kontoname wird bereits verwendet.","errors":{"name":["Dieser Kontoname wird bereit
s verwendet."]}}

(The name of this account is already in use)

As not even one transaction was pushed to firefly I assumed it was related to id 1 in the sql. So I checked that and found it related to Patreon Ireland Limited. And yes an expense account of that name already exists within my firefly installation.

It wasn't used so I tried deleting it and running the sync again. Now the importer successfully created Patreon Ireland Limited but crashed on the second transaction, this time relating to Patreon, Inc (also already existing).

So yes there seems to be a problem with attaching transactions to existing expense accounts or accounts in general.

@robvankeilegom
Copy link
Owner

Thanks, that clears out a lot. Since Firefly doesn't really return an error code, i have to check on the error message.

The application tries to create an account. If we get an error saying the account already exists it searches for the account based on name and tries to find an exact match.

This check is only on the english error message, so i'll have to figure something out for firefly instances in other languages.

If anyone wants to look at it before i get around to it, the code i'm talking about is at https://github.com/robvankeilegom/firefly-III-paypal-importer/blob/d554cc85d05d143a2547899646ee97bf3202de06/app/Firefly.php#L104C33-L104C34

@mrbreil
Copy link

mrbreil commented Oct 7, 2024

first, thanks for this great piece of software.
Any news on this?
I would like to change my Firefly instance to German, but I have this error. It works in English.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants