Closed robvankeilegom closed 2 years ago
The import run approx 3 minutes then I received this issue. I have approx 300 transactions in firefly now.
root@7bc27f9fbf27:/var/www/html# php artisan sync
Start pulling data from PayPal
Pushing data to Firefly
In Firefly.php line 58:
Attempt to read property "firefly_expense_id" on null
@m4t7 I pushed a change to skip transactions without payer. This way you should be able to get most transactions in Firefly. The sync keeps track of the Firefly id so you'll be able to run php artisan sync:firefly
again without getting duplicate transactions in Firefly.
I did add a warning in the log (storage/logs
) with the id of the transaction without payer. If you could check out whats wrong with that transaction that would be great.
Some explanation about the PayPal transaction:
Those 4 records in the transactions table are a single transaction. This app combines them to create a single transaction in Firefly. In this example the first line with code
T0006
is actual transaction. The other records will have the pp_id
of this transaction in the reference_id
field. T0300
is the amount PayPal took from my linked bank account and both T0200
records are the conversion from my currency to the receivers currency.
In Firefly you'll the them as a single transaction with a conversion:
As you can see only the first record has a payer_id
. Its fine if the others are empty.
This also means its possible to have 700 records in your database and only 300 in Firefly. At this moments all records with codes T00xx
(PayPal account to PayPal account payments), T1106
(payment reversal) and T1107
(payment refund) are pushed to Firefly. If you're missing any records in Firefly, let me know and ill add the code to be included in the push.
Hmmm, I receive now this issue.
oot@7bc27f9fbf27:/var/www/html# php artisan sync:firefly
Pushing data to Firefly
In RequestException.php line 113:
Client error: `POST https://......./api/v1/transactions` resulted in a `422 Unprocessable Entity` response:
{"message":"The given data was invalid.","errors":{"transactions.0.foreign_currency_code":["transactions.0.foreign_curre (truncated...)
Regarding your records explanation I have in total 36 missing records.
Here Is the JSON Output from the faulty transaction. It contains PHP as currency_code
.
PHP = Philippine peso https://developer.paypal.com/api/rest/reference/currency-codes/
Here are all my faulty PHP transactions, these are all transactions from the same paypal email address.
Ok, it was an issue on my end. I had not created PHP as a currency in firefly. The import works now and I do not face any issue.
root@b72f20d3595e:/var/www/html# php artisan sync:firefly
Pushing data to Firefly
Done
Thanks for all your help and support. :+1:
@m4t7 No problem, if there's anything else, let me know.
I created a separate issue to add a more clear error message when the currency isn't available in Firefly. I'm gonna close this issue.
There's a change that the importer tries to create an account with a name that already exists in Firefly.
In this case we should retrieve the existing account instead of trying to create a new one.