Git Product home page Git Product logo

flexitime's People

Contributors

aydinhassan avatar mikeymike avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flexitime's Issues

Balances are carried forward infinitely

April: +9.5
May: +1.25
June: +3.25
July: +6.5
August: +1.25
September: -22.25

Running balance appears as +11.25 and balance forward as +33.5 - where as it should be calculated as -21 in this example.

running_balance.balance is a varchar (255) not a decimal

The field type for the running_balance.balance is currently set to a VARCHAR(255) when it should be a DECIMAL(5,2) or higher. The result of having the running_balance as a string rather than a decimal is that 30.00 is less than 5.5 when you order by that column.

Capped Credit - Integrity constraint violation - Indexer

There's a bug with the crapped credit when the indexer runs if the user already has capped credit for that month. It causes a Integrity constraint violation on the primary key because an entry already exists and we're trying to add a new row.

Doctrine\DBAL\Exception\UniqueConstraintViolationException
 An exception occurred while executing 'INSERT INTO capped_credit (date, capped_credit, user_id) VALUES (?, ?, ?)' with params ["2017-01-31", 3.75, 14]:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '14-2017-01-31' for key 'PRIMARY'

There are 2 obvious approaches to this:

  1. Easiest: Remove all entries for that date and let the indexer re-add them this will also remove any rows that are no longer valid based off user edits to the previous month.
  2. Alternative: Use an insert... update on duplicate key approach to update the value. The issue here would be the cleanup of the any user's credit that is no longer valid.

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.