9a52e7fae5
- Quotes: ad-hoc email modal on Quote Details lets staff send to an address not on file; QuotesController passes overrideEmail through to NotificationService - Quotes/Details view: SMS consent display, email/SMS send button state based on consent - Accounting module: AccountingDisplayHelpers for consistent ledger formatting; AccountsController + Accounts views improvements; AccountingEnums additions - Bills/Expenses: AI account categorization fixes in BillsController and ExpensesController - InventoryAiLookupService: TDS cure fallback no longer fires on AiAugmentFromUrl path (LookupByUrlAsync already has it built in — was double-fetching) - PdfService: quote/invoice PDF updates - PricingCalculationService: minor pricing logic fix - QuoteProfile: mapping updates for new quote fields - ApplicationDbContextModelSnapshot: catches up to all 4 migrations in this branch Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
621 B
C#
18 lines
621 B
C#
using System.Text.RegularExpressions;
|
|
using PowderCoating.Core.Enums;
|
|
|
|
namespace PowderCoating.Web.Helpers;
|
|
|
|
public static class AccountingDisplayHelpers
|
|
{
|
|
// Splits at lowercase→uppercase boundaries: "AccountsReceivable" → "Accounts Receivable"
|
|
private static readonly Regex _camelSplit =
|
|
new(@"(?<=[a-z])(?=[A-Z])", RegexOptions.Compiled);
|
|
|
|
public static string ToDisplayName(this AccountSubType subType) =>
|
|
_camelSplit.Replace(subType.ToString(), " ");
|
|
|
|
public static string ToDisplayName(this AccountType accountType) =>
|
|
_camelSplit.Replace(accountType.ToString(), " ");
|
|
}
|