本文整理汇总了C#中MerchantTribe.Commerce.Orders.Order.ClearTaxes方法的典型用法代码示例。如果您正苦于以下问题:C# Order.ClearTaxes方法的具体用法?C# Order.ClearTaxes怎么用?C# Order.ClearTaxes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MerchantTribe.Commerce.Orders.Order
的用法示例。
在下文中一共展示了Order.ClearTaxes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Calculate
public bool Calculate(Order o)
{
// reset values
o.TotalShippingBeforeDiscounts = 0;
o.TotalTax = 0;
o.TotalTax2 = 0;
o.TotalHandling = 0;
o.ClearDiscounts();
if (!SkipRepricing)
{
// Price items for current user
RepriceItemsForUser(o);
}
// Discount prices for volume ordered
ApplyVolumeDiscounts(o);
//Apply Offers to Line Items and Sub Total
ApplyOffersToOrder(o, PromotionActionMode.ForLineItems);
ApplyOffersToOrder(o, PromotionActionMode.ForSubTotal);
// Calculate Handling, Merge with Shipping For Display
o.TotalHandling = CalculateHandlingAmount(o);
OrdersCalculateShipping(o);
// Calculate Per Item shipping and handling portion
//CalculateShippingPortion(o);
// Apply shipping offers
ApplyOffersToOrder(o, PromotionActionMode.ForShipping);
// Calcaulte Taxes
o.ClearTaxes();
List<Taxes.ITaxSchedule> schedules = _app.OrderServices.TaxSchedules.FindAllAndCreateDefaultAsInterface(o.StoreId);
Contacts.Address destination = o.ShippingAddress;
ApplyTaxes(schedules, o.ItemsAsITaxable(), destination, o);
// Calculate Sub Total of Items
foreach (LineItem li in o.Items)
{
o.TotalTax += li.TaxPortion;
}
return true;
}