feat: add vendor optional fields and configuration hooks
- Implemented VendorOptionalFields component to handle optional vendor details (mobile, email, address) with validation. - Created useCustomerConfig hook to load optional customer field settings from Sales configuration. - Developed useProcurementConfig hook to manage Procurement configuration flags. - Introduced accessConfigApi for managing access configuration settings. - Added openingBalancesApi for handling opening balances operations. - Created procurementConfigApi for managing procurement configuration settings. - Implemented nav-routes for permission-based routing. - Developed PDF generation for purchase orders with dynamic vendor and item details. - Added purchase-order tax helpers for tax calculations and formatting. - Defined types for opening balances and related operations.
This commit is contained in:
@@ -87,6 +87,9 @@ public static class ErrorCodes
|
||||
// A submitted GL account mapping names an account GL does not have, or cannot post to.
|
||||
public const string GlAccountInvalid = "GL_ACCOUNT_INVALID";
|
||||
|
||||
// Opening balances: each kind can be posted only once.
|
||||
public const string OpeningBalanceAlreadyPosted = "OPENING_BALANCE_ALREADY_POSTED";
|
||||
|
||||
// Sales invoice payments
|
||||
public const string SalesInvoiceNotPayable = "SALES_INVOICE_NOT_PAYABLE";
|
||||
public const string SalesInvoicePaymentExceedsBalance = "SALES_INVOICE_PAYMENT_EXCEEDS_BALANCE";
|
||||
|
||||
@@ -53,6 +53,10 @@ public static class BusinessClock
|
||||
/// <summary>Today's business day.</summary>
|
||||
public static DateOnly Today => DateOnly.FromDateTime(Now);
|
||||
|
||||
/// <summary>The UTC instant a business day starts at (its local midnight) — the inclusive lower bound of "that day".</summary>
|
||||
public static DateTime StartOfDayUtc(DateOnly day) =>
|
||||
TimeZoneInfo.ConvertTimeToUtc(day.ToDateTime(TimeOnly.MinValue, DateTimeKind.Unspecified), Zone);
|
||||
|
||||
/// <summary>
|
||||
/// The business day a UTC instant falls on. Prefer this over <see cref="Today"/> when a
|
||||
/// flow already captured a <c>now</c>/<c>createdAt</c>: it keeps the period lookup and the
|
||||
|
||||
Reference in New Issue
Block a user