bkper / bkper-issues

Feature requests and enhancements to existing bkper modules can also be filed here.
https://bkper.com/
2 stars 0 forks source link

Allow basic math operations when typing entry #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Request Summary:
I'd like to be able to do the 4 basic math operations when typing an entry, 
instead of having to type an exact a value, I wish to do something like this:
  1.5+4.7+2 money food

Notes:
There's a potential ambiguity when using division and dates. But I'm sure you 
guys can figure out a way to avoid that :D

Original issue reported on code.google.com by hgabreu on 23 Jul 2015 at 5:50

GoogleCodeExporter commented 8 years ago
Thanks for the feedback!

Would this generate only one transaction with the total value, or many entries 
for the same description, one for each sum?

The usage for sum is clear, but, in case of multiplication and division, what 
would be a use case for that? Could you please provide an example?

Cheers

Original comment by m...@nimbustecnologia.com.br on 23 Jul 2015 at 5:56

GoogleCodeExporter commented 8 years ago
My idea was to have only one transaction with the total. Use the operation just 
to facilitate what I usually have to do manually.

Multiplication is useful when you bought something in installments and need to 
make one transaction with the total, but you only remember the installment 
value. For example:
3*89.9 credit-card gift

And division is useful when you have the total but need to split it for other 
transactions. An example, is when I pay something in total and others will owe 
me. Like this:
100 bank bar
100/3 bar friend1
100/3 bar friend2

Original comment by hgabreu on 23 Jul 2015 at 8:47

GoogleCodeExporter commented 8 years ago
Great! That totally make sense!

We will add it to our roadmap. :) 
As soon as we make any progress we will keep you posted.

Many thanks!

Cheers

Original comment by m...@nimbustecnologia.com.br on 23 Jul 2015 at 9:03

GoogleCodeExporter commented 8 years ago
jquery.mathparser.js attached. A very simple jquery plugin I wrote long time 
ago, maybe  still useful (if adapted).
usage:
$(document).ready(function(){
    $('input').mathparser();    
}); 

Original comment by ma...@zoqui.com on 24 Jul 2015 at 1:05

Attachments:

GoogleCodeExporter commented 8 years ago
I have another suggestion regarding this feature. To add the operation as typed 
as a description, just so I know how I got to that total. For example:
"1.5+4.3 money food" would actually be the same as "5.8 1.5+4.3 money food"

Original comment by hgabreu on 24 Jul 2015 at 1:14

GoogleCodeExporter commented 8 years ago
Great plugin Marco!

We would prefer to implement this feature on server side, so it can work by 
recording through mobiles and APIs :)

Anyway, we will see if we can port/reuse the code.

Many thanks! :)

hgabreu, you mean, keep the original description, right?

Original comment by m...@nimbustecnologia.com.br on 24 Jul 2015 at 1:19

GoogleCodeExporter commented 8 years ago
Not really.

I meant that the operation (before parsing) could/should be appended to the 
description. Just so that later I can remember how I got to that total.

Again, this entry:
  "1.5+4.3 money food"
Would translate to:
  From account: money
  To account: food
  Amount: 5.8
  Description: 1.5+4.3

Makes sense?

Original comment by hgabreu on 24 Jul 2015 at 1:04

GoogleCodeExporter commented 8 years ago
Got it. That make sense :)

Original comment by m...@nimbustecnologia.com.br on 24 Jul 2015 at 1:27

GoogleCodeExporter commented 8 years ago
Also make sense with the #hashtags for #percentOfTax like #vat20Out for exemple

Original comment by vanespen...@gmail.com on 8 Aug 2015 at 9:13