Coder Social home page Coder Social logo

homebot's People

Contributors

jfk9w avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Forkers

pekindenis

homebot's Issues

На дашборде Expenses не отображаются графики с фильтром по категории

Заметил что при фильтрации по категории, для которой приходит пустое значение merchant, графики перестают отображаться.

Пример запроса:

with s as (select distinct on (id, time) id, time, account_amount
           from debit d
           left join shopping_receipt_items i on d.id = i.shopping_receipt_id
           where category in ('Мобильная связь')
             and merchant_name in ('')
             and (i.name in ('__all__') or '__all__' in ('__all__'))),
     t as (select date_trunc('month', time) as time,
                  sum(account_amount)       as amount
           from s
           group by 1
           order by 1),
     u as (select time, amount, avg(amount) over (order by time rows between 12 preceding and 1 preceding) as avg_amount from t)
select time, (amount - avg_amount) / avg_amount as pir
from u
where time >= '2021-06-28T08:20:49.649Z'::timestamp - '1 month'::interval and time < '2022-07-28T08:20:49.649Z'

Ошибка возникает в условии merchant_name in ('') , т.к поле не равно пустой строке, приходит значение null

Для фикса необходимо во всех запросах где есть условие merchant_name in ([[merchant]]) заменить на coalesce(merchant_name, '') in ([[merchant]])

bank-statement

Добрый день @jfk9w, вы больше не занимаетесь разработкой этого пакета ?

Подскажите, есть ли альтернативы которые вы используете ?

Хотел использовать экспорт из банкингов в локальную базу и по этим данным строить отчеты, авторизацию confirmation code можно организовать через телеграмм бота.

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.