Coder Social home page Coder Social logo

Comments (10)

amirsanni avatar amirsanni commented on May 29, 2024

Please check again. It is not wrong. Perhaps I am missing something.

If 3 quantities of an Item is bought, the total amount will be the unitPrice of the item multiplied by the quantity. Similar thing will be done for all items in that transaction.

The addition of the total amount of these items will give us the Total Amount of that transaction.

The additional of the total amount of all transactions done on a particular day will give us the total earned that day.

Hope you understand?

from mini-inventory-and-sales-management-system.

DevHunter0101x avatar DevHunter0101x commented on May 29, 2024

total transaction amount should be added into total earned today its multiplying the total transcation amount (which is correct in transaction receipt) with the number of items in transaction and then adding in the total earned.

from mini-inventory-and-sales-management-system.

DevHunter0101x avatar DevHunter0101x commented on May 29, 2024

image

Just as in screenshot the total earned was zero and i did a transaction of two items which total was 111
hence total earned was 111 but it multiplied it with total number of items and showed 222.
similarly if we put three , four , five or so on it does multiply the total amount of transaction with total items and then displays total earned which is invalid !

from mini-inventory-and-sales-management-system.

DevHunter0101x avatar DevHunter0101x commented on May 29, 2024

image

now here see another transaction i did. what it did is multiplied it with total items. we had 222 already earned and now we earned 400 but it is displaying wrong sum of earned. it is multiplying 400 with 4 and adding 1600 in 222 which makes 1822 while it should add only 400 in total earned. !
fix it.

from mini-inventory-and-sales-management-system.

amirsanni avatar amirsanni commented on May 29, 2024

Oh! Guess this happens immediately after a transaction is done, right?

When you refresh the page, does it still show a wrong calculation? This will help in isolating the issue.

from mini-inventory-and-sales-management-system.

DevHunter0101x avatar DevHunter0101x commented on May 29, 2024

refreshing the page still shows the wrong calculation.
it is simply multiplying the actual correct calculation with the number of items.
only this multiplication has to stop

from mini-inventory-and-sales-management-system.

DevHunter0101x avatar DevHunter0101x commented on May 29, 2024

if we have 1 item and its price is 200 it will multiply total with 1 i.e 200* 1 =200
if we have 4 items and its price each is 200 it will multiply total 800 with 4 i.e 800* 4 =3200 which is wrong

from mini-inventory-and-sales-management-system.

amirsanni avatar amirsanni commented on May 29, 2024

Will look into it. Thanks

from mini-inventory-and-sales-management-system.

DevHunter0101x avatar DevHunter0101x commented on May 29, 2024

from mini-inventory-and-sales-management-system.

amirsanni avatar amirsanni commented on May 29, 2024

Fixed

from mini-inventory-and-sales-management-system.

Related Issues (20)

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.