[ic] total item-list for numeric field other than price

Ed LaFrance edl@newmediaems.com
Thu, 07 Dec 2000 14:33:26 -0800

You could calculate the value on just about any page with this code:

[set cost_total][/set]
[seti cost_total][calc][scratch cost_total] + ([item-field cost] * 

...[scratch cost_total] would yield the total 'cost' for the purchase order 
once the above code had run, and would retain the value until the code was 
run again (you would probably want to put the code on the basket or 
checkout page so it would pick up changes in the cart contents).  I haven't 
seen the Quickbooks export code, but chances are you would just insert 
[scratch cost_total] where ever you need this value, or 
$Safe{scratch}->{cost_total} in a Perl block.

- Ed L.

At 01:37 PM 12/7/00 -0800, you wrote:
>Hi all,
>I am setting up to export a "purchase order" transaction to Quickbooks.  On
>the invoice export that Mike built you can use [total-cost] or [sub-total]
>in the AMOUNT field for quickbooks.  On the purchase order, I need to use
>the total of the item list from a different field (named "cost" in my
>database), so that my total cost for the items is entered into the purchase
>order rather than the total sales price.  I can easily get the individual
>costs into the export using [item-field cost], but can someone tell me how
>to get the sum of these [item-field cost] 's in the [item-list] into a
>variable or somesuch?
>Greg Hanson
>2445 NE Division
>Waterside Bldg, Suite 303
>Bend, OR 97701
>Toll Free               1-877-631-2888
>Phone           1-541-388-0100
>Fax             1-541-388-0200
>URL  http://www.valuemedia.com
>Interchange-users mailing list

New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          edl@newmediaems.com
Placerville, CA  95667         http://www.newmediaems.com
(530) 622-9421                 (530) 622-9426 Fax
(866) 519-4680 Toll-Free