# POS Sales Order – Full Dynamic (Django + AJAX) Below is a complete, production-ready example for a dynamic POS **Order Create** page using **Django + AJAX**. It includes: * A responsive template with Bootstrap * AJAX product search by **SKU / Name / Category** (debounced) * Click-to-append product rows to the cart table * Live calculations (row total, subtotal, discount, tax, VAT, grand total) * Payment & customer info (right side) * Submit order via AJAX → redirect to invoice page > ⚠️ Adjust field names to match your existing models (I mapped to your usual `ProductList`, `CategoryList`). --- ## 1) Template: `templates/pos/pos_order_create.html` ```html {% extends 'common/base.html' %} {% load static %} {% block title %}POS Order Create{% endblock %} {% block content %}
| Image | Product Name & SKU | Qty | Unit Price | Row Total | Action |
|---|
| Subtotal: | 0.00 |
|---|---|
| Discount (amount): | |
| Tax (%) | |
| VAT (%) | |
| Grand Total: | 0.00 |
{{ order.customer_name }}
{{ order.customer_mobile }}
{{ order.customer_email }}
{{ order.customer_address }}
Date: {{ order.created|date:"Y-m-d H:i" }}
Payment: {{ order.payment_method|title }}
| # | Product | Qty | Unit Price | Total |
|---|---|---|---|---|
| {{ forloop.counter }} | {{ it.product.name }} {{ it.product.sku }} | {{ it.qty }} | {{ it.unit_price }} | {{ it.row_total }} |
| Subtotal | {{ order.subtotal }} |
|---|---|
| Discount | {{ order.discount }} |
| Tax (%) | {{ order.tax_percent }} |
| VAT (%) | {{ order.vat_percent }} |
| Grand Total | {{ order.grand_total }} |
| Paid | {{ order.paid_amount }} |
| Due | {{ order.due_amount }} |