Overview
The Product data model represents automotive products and services available for sale in MotorDesk. Products include oils, filters, parts, and services, each with pricing, maintenance intervals, and tax configuration.TypeScript Interface
Field Reference
Unique identifier for the productFormat:
prod-XXX where XXX is a sequential numberExample: prod-001Barcode number for the productFormat: Typically 13-digit EAN/UPC codeExample:
7751234567801Note: Used for quick product lookup at point of saleProduct name and descriptionFormat: Free text, typically includes brand, type, and specificationsExamples:
Aceite Castrol Magnatec 10W-40 (Galón)Filtro de Aceite Bosh TOY-01Pastillas de Freno Delanteras Toyota
Product category for organization and filteringCommon Categories:
Aceites de Motor- Motor oilsFiltros- Filters (oil, air, fuel)Refrigerantes- CoolantsRepuestos- Parts and components
Aceites de MotorSales price per unit (before taxes)Type: Decimal number with 2 decimal placesExample:
120.00, 25.00, 180.00Note: IGV (18%) is calculated separately at sale timeUnit of measurement for the productCommon Values (SUNAT codes):
NIU- Unit (unidad)GAL- Gallon (galón)LTR- Liter (litro)PAR- Pair (par)KGM- Kilogram
GAL, NIUNote: Must comply with SUNAT’s official unit codes for electronic invoicingRecommended maintenance interval in kilometersType: IntegerExample:
5000, 10000, 20000Note: Used to calculate when the next service is due. Set to 0 if not applicableIGV (tax) applicability codeValid Values (SUNAT codes):
10- Gravado - Operación Onerosa (Taxable)20- Exonerado - Operación Onerosa (Tax exempt)30- Inafecto - Operación Onerosa (Not taxed)
10 (most common - taxable at 18%)Note: Required for SUNAT electronic invoicingProduct Categories
Aceites de Motor (Motor Oils)
Aceites de Motor (Motor Oils)
Engine oils with various viscosities and specifications.Common Products:
- Conventional oils (10W-40, 15W-40)
- Synthetic oils (5W-40, 0W-20)
- Semi-synthetic blends
Filtros (Filters)
Filtros (Filters)
Replacement filters for various vehicle systems.Types:
- Oil filters
- Air filters
- Fuel filters
- Cabin air filters
Refrigerantes (Coolants)
Refrigerantes (Coolants)
Engine cooling system fluids.Types:
- Long-life coolant
- Standard coolant
- Various colors (green, red, blue)
Repuestos (Parts)
Repuestos (Parts)
Replacement parts and components.Examples:
- Brake pads and rotors
- Spark plugs
- Belts and hoses
- Batteries
Example Data
Motor Oil Product
Oil Filter Product
Brake Pads Product
Relationships
Sale Details
Sale Details
Products are sold through sale detail line items.
Vehicle Usual Products
Vehicle Usual Products
Products can be associated with specific vehicles as frequently used items.
Business Logic
Price Calculation with IGV
When a product is added to a sale, the price needs to be calculated with tax:Maintenance Interval Tracking
Use product maintenance intervals to determine next service date:Product Search and Filtering
Barcode Lookup
SUNAT Compliance
Electronic Invoice RequirementsProducts must include:
unidadMedida- Official SUNAT unit codeafectacionIgv- Tax applicability code- Proper pricing with 2 decimal places
Valid SUNAT Unit Codes
Validation Rules
Data Storage
Mock Data Location
/src/data/mock/products.tsTypeScript export with sample product dataJSON Data Location
/src/data/json/products.jsonRaw JSON array of product objectsRelated Models
- Sales - Products are sold through sales transactions
- Sale Details - Line items linking products to sales
- Vehicles - Products have maintenance intervals for vehicles
