Giter Club home page Giter Club logo

Comments (6)

LucsT avatar LucsT commented on June 2, 2024

Concerning the invoices button, it's because we need to add the connector here :
https://github.com/cozy/cozy-banks/blob/master/src/ducks/brandDictionary/brands.json
I can do it for you, and make the merge/publish quicker, but for now, we need to fix the matching problem first I think.

For matching, it failed because date of operation and date of bills are too far away : 1st of month N, to ~15th of month (N+1)
I have a second report of the same problem on my side.
Did you find anywhere the date of a past/future payout ? I didn't.

My proposal is :
Put the bill date to the last day of the month (libs like moment or date-fns can do it for you probably)
As matching is expect to be in a -15/+29 window, it should work out of the box for this situation.
Try to keep the filename constant, it will avoid duplication, and it's pretty good right now.

What do you think ?

from tagandpass.

LucsT avatar LucsT commented on June 2, 2024

@rclement (forgot to notify you, not sure if needed)

from tagandpass.

rclement avatar rclement commented on June 2, 2024

@LucsT sounds good to me!

I'll try fixing the date metadata in a PR quickly, following your recommendations.

from tagandpass.

rclement avatar rclement commented on June 2, 2024

@LucsT I'm working on a PR to fix this right now.

Generating a new date to the last day of the month is pretty easy using moment.endOf.
As you mentioned, only the metadata date of the bill should be using this "artificial" date, not the output PDF filename to avoid duplication.
However, I am wondering if when performing the sync afterwards, will the database of imported data be updated with the new date metadata?

e.g. if a previous entry was:

    {
      "vendor": "semitag",
      "date": "2019-02-01T00:00:00.000Z",
      "amount": 1.45,
      "currency": "EUR",
      "fileurl": "https://tag-and-pass.tag.fr/api/account/factures/2019-02-01.pdf",
      "filename": "2019-02-01_tagandpass_1.45€_001136660219.pdf",
      "metadata": {
        "importDate": "2019-03-11T15:12:53.634Z",
        "version": 1
      },
      "invoice": "io.cozy.files:2019-02-01_tagandpass_1.45€_001136660219.pdf",
      "_id": "0403a4d2-5b7c-4b37-b7cf-3d285d0aa8d3"
    }

will it be transformed to:

    {
      "vendor": "semitag",
      "date": "2019-02-28T23:59:59.999Z",
      "amount": 1.45,
      "currency": "EUR",
      "fileurl": "https://tag-and-pass.tag.fr/api/account/factures/2019-02-01.pdf",
      "filename": "2019-02-01_tagandpass_1.45€_001136660219.pdf",
      "metadata": {
        "importDate": "2019-03-11T15:12:53.634Z",
        "version": 1
      },
      "invoice": "io.cozy.files:2019-02-01_tagandpass_1.45€_001136660219.pdf",
      "_id": "0403a4d2-5b7c-4b37-b7cf-3d285d0aa8d3"
    }

?

FYI, when trying to simulate locally the "afterward sync", the date field in importedData.json is not updated to disk (might be a limitation of yarn standalone dev mode).

from tagandpass.

LucsT avatar LucsT commented on June 2, 2024

No, the bills will not be updated, so you will have duplicated bills, as they will not match any operations they will be 'invisible'.

If you want, put the attribute 'version' to '2'. I can do some cleaning afterward on your cozy and some others cozy of early adopters of tagandpass. Will be more easy with this discrimination.

from tagandpass.

rclement avatar rclement commented on June 2, 2024

Fixed by #18, released in version 1.2.0

from tagandpass.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.