Pages

2010/03/23

Viewing Items Sold in Kits vs Items Sold Directly

It may be of interest for you to know how many items you have been selling directly versus how many items you've sold as part of a kit. The following search is a good starting point to get this information:

Item Search

CRITERIA:
Transaction: Posting = True
Transaction: Account Type = Income

COLUMNS
Formula (Text) decode({memberitem},'',{name},{memberitem}) - GROUP
Formula (Text) decode({memberitem},'','Direct','Part of Kit') - GROUP
Formula (Numeric) decode({memberitem},'',{transaction.quantity},{transaction.quantity}*{memberquantity}) - SUM

This search will output three columns:
  1. The item name
  2. If the item represents the total quantity sold directly or as part of a kit
  3. The quantity sold
So if you have a certain item that you sell directly as well as part of a kit, the item will be displayed on two separate rows - one row for the total quantity sold directly and one row showing the quantity sold as part of kits.
If you want to see the total sales amount, well, you'll have a bit of a decision to make. For direct sales it's no problem, just grab the Amount field. But items sold as part of Kits do not generate their own sales amount; the Amount is the amount of the entire kit. So you'll need to determine what the value of an item sold within a kit is. You could just grab the standard Base Price off the item record, which probably makes the most sense. If you would like to do this, add the following line to your columns:
Formula (currency) decode({memberitem},'',{transaction.amount},{transaction.quantity}*{memberquantity}*{memberitem.price}) - SUM
There are a couple of restrictions to note here:
  • This will not work if you have kits within kits
  • This search does not show the parent kits - only their members
  • This search grabs all transactions hitting Income accounts, so this includes things like credits, which would appear as negatives here
To explain the formulas a bit, you'll notice I use decode() a lot. Decode works in the following way: decode(value1, value2, value3, value4) -> IF value1 is equal to value2, THEN output value3 ELSE output value4. So what we do here is check if there is a value in a member item, and then output one value or another depending on if we're dealing with a kit or not. Following this logic, you should be able to add other fields as you want.

Hope this helps!

0 comments:

Post a Comment