[Zope] Dynamic Sum

Charlie Reiman creiman@kefta.com
Tue, 17 Sep 2002 09:55:20 -0700


I would create a brain (see the Zope book) to compute cost * qty as a new
field, then use the dtml total var on that synthetic field.

BTW, your corp mandated sig is a little bit out of control. There was a day
when sigs of more than 4 lines brought forth a firestorm of criticism.

I miss those days.

Charlie "Reverse engineering of this email message is strictly prohibited."
Reiman

> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Michael Fox
> Sent: Monday, September 16, 2002 6:04 PM
> To: zope@zope.org
> Subject: [Zope] Dynamic Sum
>
>
> Hi *,
>
> I have a dtml-in which lists both quantity and cost of items in my table.
>
> I am generating the total for each item row like so -
>
> <dtml-var expr="cost * qty" fmt="dollars-and-cents-with-commas">
>
> What would be the practical approach to calculating the sum of
> all totals for each item here?
>
> Regards,
> Michael Fox
>
> Web Analyst/Programmer
> Century Software
> Ph:    +612 9460 1422
> Fax:   +612 9460 3098
> Email: michael@centurysoftware.com.au
>
> This E-mail from Century Software Pty Ltd expresses the views of
> the sender and not necessarily the views of the Company. The
> E-mail and any files transmitted with it are confidential to the
> intended recipient at
> the E-mail address to which it has been addressed. The E-mail may
> not be disclosed or used by any other than the addressee, nor may
> it be copied in any way. If you are not the intended recipient
> please contact the
> sender as soon as possible and delete any copies of this message.
> Please note that although this E-mail has been checked, we cannot
> accept any responsibility for any transmitted viruses. It is
> therefore your responsibility to virus scan attachments (if any).
>