Ejemplo n.º 1
0
 /// <summary>
 /// Quotation
 /// </summary>
 /// <param name="rates"></param>
 /// <param name="segment"></param>
 /// <param name="amountToBy"></param>
 /// <param name="total"></param>
 public Quotation(ExchangeRate rates, SegmentTax segment, ulong amountToBy, string total)
 {
     ExchangeRate = rates;
     Segment      = segment;
     AmountToBuy  = amountToBy;
     Total        = total;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Calculate Customer Quotation
        /// </summary>
        /// <param name="rates"></param>
        /// <param name="segment"></param>
        /// <param name="amountToBy"></param>
        /// <returns></returns>
        public Quotation Calculate(ExchangeRate rates, SegmentTax segment, ulong amountToBy)
        {
            var quotation = new Quotation(rates, segment, amountToBy);

            quotation.Total = $"R$ {quotation.AmountToBuy * quotation.CurrencyCodeExchange * (1 + quotation.Segment.Tax):0.00}"
                              .ToString(CultureInfo.CurrentCulture);
            return(quotation);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Quotation
 /// </summary>
 /// <param name="rates"></param>
 /// <param name="segment"></param>
 /// <param name="amountToBy"></param>
 public Quotation(ExchangeRate rates, SegmentTax segment, ulong amountToBy)
 {
     ExchangeRate = rates;
     Segment      = segment;
     AmountToBuy  = amountToBy;
 }