From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Leech-Pepin Subject: Re: CLOCKTABLE multiply time expended by hourly rate? Date: Thu, 21 Jul 2011 10:16:17 -0400 Message-ID: References: <87y5zsws3j.wl%ded-law@ddoherty.net> <83sjpzc2of.fsf@yahoo.it> <87sjpzlt5x.wl%ded-law@ddoherty.net> <83hb6fbvpo.fsf@yahoo.it> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6568f900a977504a894fe37 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qju36-0004D4-Cq for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 10:16:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qju31-0008Sj-7W for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 10:16:24 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:62728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qju30-0008SA-WA for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 10:16:19 -0400 Received: by wwf22 with SMTP id 22so1024501wwf.30 for ; Thu, 21 Jul 2011 07:16:17 -0700 (PDT) In-Reply-To: <83hb6fbvpo.fsf@yahoo.it> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Giovanni Ridolfi Cc: "Daniel E. Doherty" , Org-mode List --0016e6568f900a977504a894fe37 Content-Type: text/plain; charset=UTF-8 Or if you want to preserve your rounding until the last point in your calculations: | Test 1 | | | 1:15 | 62.50 | 76 | | Test 2 | | | 2:48 | 140.00 | 169 | #+TBLFM: $5=$4*(50/60.0);Df2::$6=$4+1 Since 50/60 is 0.8333... by rounding it prematurely you lose some of the precision in your billing. Column 6 is just there to confirm for me what org does when you add or multiply times. It counts the minutes as units and properly adjusts the hours to be 60*# of hours. So you just have to account for that when billing On Thu, Jul 21, 2011 at 09:37, Giovanni Ridolfi wrote: > Daniel E. Doherty writes: > > > That's certainly thinking outside the box, but I don't think it > > works. > > Actually, Daniel you don't have to *think*, you've to demonstrate > that it works or that it doesn't /tertium non datur/. > > > In your example, 1:09 represents 1/9th in calc's fraction mode, > > not 1+9/60 which it would have to in order to compute with it. > Not with GNU/Emacs 23.3 calc. > > If you bill 50 per 1 hour, you bill > > (/ 50 60.0 ) is 0.83 per minute. > > If you bill 1 hour + 9 minutes it is 69 minutes > > (* 0.83 69) 57.269999999999996 = 57.27 > > isn't it ? > > And the fifth column in my table (see below) does compute 57.27 or not? > > You may say: "Ah but this is only one example, you've been lucky!" > > I reply, what about the second line? > > (* (+ 120 48) 0.83) = 139.44 > > Calc is *really* smart, isn't it? > > cheers, > Giovanni > > > > > Regards, > > > > At Thu, 21 Jul 2011 13:07:28 +0200, > > Giovanni Ridolfi wrote: > >> > >> Daniel E. Doherty writes: > >> > >> > Hi all, > >> > > >> > I am trying to use orgmode to bill for time. My idea is to add a > column > >> > that multiplies the elapsed time column by an hourly rate. > >> > >> what about using a minute rate? > >> > >> (/ 50 60.0) 0.83 so: > >> > >> | Argo Status Hearing <2011-06-28 Tue 09:00> | | | 1:09 | 57.27 | > >> | Letter of Discovery Deficiencies | | | 2:48 | 139.44 | > >> #+TBLFM: $5=$4*0.83;Df2 > >> > >> > > --0016e6568f900a977504a894fe37 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Or if you want to preserve your rounding until the last point in your calcu= lations:

| Test 1 |=C2=A0=C2=A0 |=C2=A0=C2=A0 | 1:15 |=C2=A0 62.50 |= =C2=A0 76 |
| Test 2 |=C2=A0=C2=A0 |=C2=A0=C2=A0 | 2:48 | 140.00 | 169 |=
#+TBLFM: $5=3D$4*(50/60.0);Df2::$6=3D$4+1

Since 50/60 is 0.8333... by rounding it prematurely you lose some of the pr= ecision in your billing.
Column 6 is just there to confirm for me what o= rg does when you add or multiply times. It counts the minutes as units and = properly adjusts the hours to be 60*# of hours.

So you just have to account for that when billing

On Thu, Jul 21, 2011 at 09:37, Giovanni Ridolfi <giovanni.ridolfi@yahoo= .it> wrote:
Daniel E. Doherty <ded-law@ddoherty.net> writes:
> That's certainly thinking outside the box, but I don't t= hink it
> works.

Actually, Daniel you don't have to *think*, you've to demonstrate that it works or that it doesn't /tertium non datur/.

> In your example, 1:09 represents 1/9th in calc's fraction mode, > not 1+9/60 which it would have to in order to compute with it.
Not with GNU/Emacs 23.3 calc.

If you bill 50 per 1 hour, you bill

(/ 50 60.0 ) is 0.83 per minute.

If you bill 1 hour + 9 minutes it is 69 minutes

(* 0.83 69) 57.269999999999996 =C2=A0=3D 57.27

isn't it ?

And the fifth column in my table (see below) does compute 57.27 or not?

=C2=A0 You may say: "Ah but this is only one example, you've been= lucky!"

=C2=A0I reply, what about the second line?

(* (+ 120 48) 0.83) =3D 139.44

Calc is *really* smart, isn't it?

cheers,
Giovanni

>
> Regards,
>
> At Thu, 21 Jul 2011 13:07:28 +0200,
> Giovanni Ridolfi wrote:
>>
>> Daniel E. Doherty <ded-= law@ddoherty.net> writes:
>>
>> > Hi all,
>> >
>> > I am trying to use orgmode to bill for time. =C2=A0My idea is= to add a column
>> > that multiplies the elapsed time column by an hourly rate. >>
>> what about using a minute rate?
>>
>> (/ 50 60.0) 0.83 so:
>>
>> | Argo Status Hearing <2011-06-28 Tue 09:00> | =C2=A0 | =C2= =A0 | 1:09 | =C2=A057.27 |
>> | Letter of Discovery Deficiencies =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 | =C2=A0 | =C2=A0 | 2:48 | 139.44 |
>> #+TBLFM: $5=3D$4*0.83;Df2
>>
>>


--0016e6568f900a977504a894fe37--