new updates

This commit is contained in:
2026-09-17 14:22:45 +05:30
committed by ImanThiyanga
parent e1f19fe413
commit 8c3d62223c
261 changed files with 102091 additions and 549 deletions
@@ -73,6 +73,14 @@ export function validateBrandName(name: string): Record<string, string> {
return errors
}
export function validateTaxRate(code: string, name: string, percentage: number): Record<string, string> {
const errors: Record<string, string> = {}
if (!code.trim()) errors.code = "Code is required"
if (!name.trim()) errors.name = "Name is required"
if (Number.isNaN(percentage) || percentage < 0 || percentage > 100) errors.percentage = "Percentage must be between 0 and 100"
return errors
}
/** Renamed from validateVariantCategoryName — "variant categories" are Item Types now. */
export function validateItemTypeName(name: string): Record<string, string> {
const errors: Record<string, string> = {}