Options for Template Email to Vendor
-
- Ensign (ENS)
- Posts: 7
- Joined: Wed Feb 09, 2011 3:44 pm
Options for Template Email to Vendor
Can anyone tell me how to include COGS in Vendor email template?
Re: Options for Template Email to Vendor
Edit the template and locate
and update it like
Code: Select all
#if ($orderItem.OrderItemType == "Product")
$orderItem.Sku
#else
Code: Select all
#if ($orderItem.OrderItemType == "Product")
$orderItem.Sku
$orderItem.CostOfGoods
#else
-
- Ensign (ENS)
- Posts: 7
- Joined: Wed Feb 09, 2011 3:44 pm
Re: Options for Template Email to Vendor
Thanks. That was easy! I was able to include it as a cell just to the right of the Quantity. The problem I have now is that I have many products where I do not want to include the CostOfGoods in the Vendor Email. Can I tweak the code to enable the COGS only if there is a value greater than zero in the field because the field defaults to 0.00. Also, is there any way to remove the additional zeros after the COGS when it populates in the vendor email (It looks like 9.9900 instead of 9.99)?
Thanks for your help with this!
Thanks for your help with this!
Re: Options for Template Email to Vendor
Try it like this
Code: Select all
$orderItem.CostOfGoods.ToString("ulc")
-
- Ensign (ENS)
- Posts: 7
- Joined: Wed Feb 09, 2011 3:44 pm
Re: Options for Template Email to Vendor
That worked! Thank you. Now all I need to figure out is how to not include COGS in the purchase order if the COGS field does not have a value greater than 0.00 (the default) listed. We have several orders that will not require COGS and we do not want the field to show with this 0.00 as the COGS. Is there a way to only include COGS in the purchase order if the amount in the COGS field is greater than 0.00?
Re: Options for Template Email to Vendor
Yes its possible. You can do it like
Code: Select all
#if($orderItem.CostOfGoods > 0)
$orderItem.CostOfGoods.ToString("ulc")
#end
Re: Options for Template Email to Vendor
I have the same problem. Does anyone know how ToString("ulc") and ToString("C") are different?