public OrderItem(CustomerOrderOverview order, string currency) { PurchaseOrderId = order.PurchaseOrderId; IsCanceled = order.IsCanceled; IsComplete = order.IsComplete; OrderNumber = order.OrderNumber; Total = $"{StringUtil.FormatDecimal(order.Total)} {currency}"; }
private static IEnumerable <CustomerRelatedItem> CreateOrderItem(CustomerOverview cust, CustomerOrderOverview order, IProject project) { yield return (CustomerRelatedItem.Create( order.Dt, CustomerRelatedItem.OrderItemType, new OrderItem(order, cust.Currency))); if (!string.IsNullOrWhiteSpace(order.CustomerMessage)) { yield return(CreateMessageItem(order.Dt.AddSeconds(-1), cust.Nick, order.CustomerMessage, true)); } if (!string.IsNullOrWhiteSpace(order.InternalMessage)) { yield return(CreateMessageItem(order.Dt.AddSeconds(-2), project.Name, order.InternalMessage, false)); } }