{% extends "admin/base_site.html" %} {% load i18n admin_urls import_export_tags %} {% block title %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %} {% block extrastyle %}{{ block.super }} {% endblock %} {% block extrahead %}{{ block.super }} {% if confirm_form %} {{ confirm_form.media }} {% else %} {{ form.media }} {% endif %} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block content %}

📊 Import Parts Pricing Data

📋 Import Process

Step 1: Choose File Format
Select CSV or Excel file format
Step 2: Select Resource
Choose pricing import resource
Step 3: Upload File
Upload your pricing data file
{% if confirm_form %}

⚠️ Confirm Import

Please review the import preview below and confirm the import.

{% if result.has_errors %}

❌ Errors Found

{{ result.base_errors|join:", " }}

{% for row_errors in result.row_errors %}

Row {{ row_errors.0 }}: {{ row_errors.1|join:", " }}

{% endfor %}
{% endif %}

📈 Import Summary

New: {{ result.totals.new }} records
Updated: {{ result.totals.update }} records
Deleted: {{ result.totals.delete }} records
Skipped: {{ result.totals.skip }} records
Errors: {{ result.totals.error }} records
{% csrf_token %} {{ confirm_form.as_p }}
❌ Cancel
{% else %}
{% csrf_token %}
{% for field in form %}
{% if field.name == 'input_format' %}
Recommended: CSV format for best compatibility
{% endif %} {% if field.name == 'resource' %}
PartPricingResource: For importing/updating prices
PartPricingExportResource: For exporting current data
PartBulkDataResource: For full data export
{% endif %}
{{ field }} {% if field.errors %}
{{ field.errors|join:", " }}
{% endif %}
{% endfor %}

📄 Expected CSV Format

Boodmo ID,Part Name,Part Number,Brand,Current MRP (₹),New MRP (₹),In Master Price List,Pack Quantity,HSN Code,GST %
12345,"Brake Pad","BP001","Bosch",500.00,520.00,TRUE,1,"8708",18
67890,"Oil Filter","OF002","Mann",250.00,260.00,FALSE,1,"8421",18
💡 Tip: Export existing data first to get the exact format, then modify the "New MRP" column
{% endif %}

💡 Import Help & Tips

🔍 Before Importing

  • Export current data to get the correct format
  • Use "Boodmo ID" as the unique identifier
  • Only modify the "New MRP" column for price updates

✅ Best Practices

  • Test with a small subset first
  • Keep backups of original data
  • Verify price changes after import

⚠️ Common Issues

  • Missing Boodmo ID (required field)
  • Invalid decimal format for prices
  • Brand name not matching existing records
{% endblock %}