private ConsoleSnippet Description_as_console_snippet(IPotentialMatch potential_match)
 {
     return(new ConsoleSnippet
     {
         Text = Description_string,
         Text_colour = Get_colour(potential_match.Full_text_match, potential_match.Partial_text_match)
     });
 }
Exemple #2
0
 public AutoMatchedRecord(
     TThirdPartyType source_record,
     IPotentialMatch match,
     int index)
 {
     SourceRecord = source_record;
     Match        = match;
     Index        = index;
 }
        private string Create_new_description(IPotentialMatch potential_match)
        {
            var combined_amounts = potential_match.Actual_records[0].Main_amount().To_csv_string(true);

            for (int count = 1; count < potential_match.Actual_records.Count; count++)
            {
                combined_amounts += $", {potential_match.Actual_records[count].Main_amount().To_csv_string(true)}";
            }
            return($"{ReconConsts.SeveralExpenses} ({combined_amounts})");
        }
 private ConsoleSnippet Amount_as_console_snippet(IPotentialMatch potential_match)
 {
     return(new ConsoleSnippet
     {
         Text = Amount_string + ",",
         Text_colour = Get_colour(
             potential_match.Rankings != null && potential_match.Rankings.Amount == 0,
             potential_match.Rankings != null && potential_match.Rankings.Amount <= ReconConsts.PartialAmountMatchThreshold)
     });
 }
 private ConsoleSnippet Date_as_console_snippet(IPotentialMatch potential_match)
 {
     return(new ConsoleSnippet
     {
         Text = Date_string + ",",
         Text_colour = Get_colour(
             potential_match.Rankings != null && potential_match.Rankings.Date == 0,
             potential_match.Rankings != null && potential_match.Rankings.Date <= ReconConsts.PartialDateMatchThreshold)
     });
 }
 public List <ConsoleSnippet> Get_console_snippets(IPotentialMatch potential_match)
 {
     if (_console_snippets == null)
     {
         _console_snippets = new List <ConsoleSnippet>();
     }
     else
     {
         _console_snippets.Clear();
     }
     _console_snippets.Add(Index_as_console_snippet());
     _console_snippets.Add(Date_as_console_snippet(potential_match));
     _console_snippets.Add(Amount_as_console_snippet(potential_match));
     _console_snippets.Add(Description_as_console_snippet(potential_match));
     return(_console_snippets);
 }
Exemple #7
0
        private string Create_new_description(
            IPotentialMatch potential_match,
            bool expense_amounts_match,
            double sum_of_all_matches)
        {
            var combined_amounts = potential_match.Actual_records[0].Main_amount().To_csv_string(true);

            for (int count = 1; count < potential_match.Actual_records.Count; count++)
            {
                combined_amounts += $", {potential_match.Actual_records[count].Main_amount().To_csv_string(true)}";
            }

            var extra_text = expense_amounts_match
                ? ""
                : $"{ReconConsts.ExpensesDontAddUp} ({sum_of_all_matches.To_csv_string(true)})";

            return($"{ReconConsts.SeveralExpenses} ({combined_amounts}){extra_text}");
        }