No custom coding needed! Use existing Frappe functionality with some custom fields.
Location: Setup > Customize Form > Purchase Order Item
Add these fields:
Field 1:
- Label: Customer Allocation Details
- Type: Long Text
- Field Name: customer_allocation_details
Field 2:
- Label: Total Customers
- Type: Int
- Field Name: total_customers_count
For each item, enter customer breakdown like this:
กุ้งก้นถ้วย (Total: 5.50 KG)
- PC 19 ROSS: 0.50 KG (PO: ROSS-001)
- PC 19 STAFF CANTEEN: 3.00 KG (PO: STAFF-001)
- เบอร์ 10 ปั่นกะลิบ: 2.00 KG (PO: B10-001)
พริกจินดาแดง (Total: 1.00 KG)
- PC 19 ROSS: 1.00 KG (PO: ROSS-001)
When creating PO, add a comment with customer breakdown:
Comment Title: "Customer Allocation"
Comment Content:
CUSTOMER ALLOCATION BREAKDOWN:
กุ้งก้นถ้วย - 5.50 KG Total:
✓ PC 19 ROSS (MAIN KITCHEN): 0.50 KG
✓ PC 19 STAFF CANTEEN: 3.00 KG
✓ เบอร์ 10 ปั่นกะลิบ: 2.00 KG
พริกจินดาแดง - 1.00 KG Total:
✓ PC 19 ROSS (MAIN KITCHEN): 1.00 KG
กิ่งก้นถ้วย - 3.00 KG Total:
✓ PC 19 STAFF CANTEEN: 3.00 KG
Location: Setup > DocType > New
DocType Name: Customer PO Allocation Is Child Table: ✓ Yes
Fields:
customer (Link to Customer)
customer_po_no (Data)
item_code (Link to Item)
allocated_qty (Float)
delivery_date (Date)
notes (Data)
Location: Setup > Customize Form > Purchase Order
Add Field:
Label: Customer Allocations
Type: Table
Options: Customer PO Allocation
Field Name: customer_allocations
When creating PO, add rows like this:
Customer | Customer PO No | Item Code | Allocated Qty | Delivery Date | Notes |
---|---|---|---|---|---|
PC 19 ROSS | ROSS-001 | กุ้งก้นถ้วย | 0.50 | 15/01/2024 | Main Kitchen |
PC 19 STAFF | STAFF-001 | กุ้งก้นถ้วย | 3.00 | 16/01/2024 | Staff Canteen |
เบอร์ 10 | B10-001 | กุ้งก้นถ้วย | 2.00 | 17/01/2024 | ปั่นกะลิบ |
PC 19 ROSS | ROSS-001 | พริกจินดาแดง | 1.00 | 15/01/2024 | Main Kitchen |
Location: Setup > Print Format > New
Print Format Name: PO with Customer Allocation
<h3>Purchase Order: {{ doc.name }}</h3>
<h4>Supplier: {{ doc.supplier }}</h4>
<table class="table table-bordered">
<thead>
<tr>
<th>Item</th>
<th>Total Qty</th>
<th>Customer Breakdown</th>
</tr>
</thead>
<tbody>
{% for item in doc.items %}
<tr>
<td>{{ item.item_code }}</td>
<td>{{ item.qty }} {{ item.uom }}</td>
<td>
<!-- Manual customer breakdown -->
{{ item.customer_allocation_details or "No allocation details" }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
Keep a simple Excel file alongside your Frappe PO:
File Name: PO_Customer_Allocation_{{ po_name }}.xlsx
PO Number | Item Code | Total Qty | Customer 1 | Qty 1 | Customer 2 | Qty 2 | Customer 3 | Qty 3 |
---|---|---|---|---|---|---|---|---|
PO-001 | กุ้งก้นถ้วย | 5.50 | PC 19 ROSS | 0.50 | PC 19 STAFF | 3.00 | เบอร์ 10 | 2.00 |
PO-001 | พริกจินดาแดง | 1.00 | PC 19 ROSS | 1.00 |
Attach this Excel to your Purchase Order using the "Attach" button.
Location: Setup > Tags
Create tags for each customer:
#PC19-ROSS
#PC19-STAFF
#BERTH-10
For each PO item, add tags in the description:
กุ้งก้นถ้วย - 5.50 KG
#PC19-ROSS (0.50kg) #PC19-STAFF (3.00kg) #BERTH-10 (2.00kg)
พริกจินดาแดง - 1.00 KG
#PC19-ROSS (1.00kg)
Time to Setup: 15 minutes Benefits:
- Clean tabular view
- Easy to search and filter
- Can create reports later
- Professional appearance
Time to Setup: 0 minutes
Benefits:
- Use immediately
- No configuration needed
- Works with existing system
Time to Setup: 5 minutes Benefits:
- Easy calculations
- Can share with others
- Familiar interface
- Open your Purchase Order
- Check the Customer Allocation table/comment
- Create separate Delivery Notes:
For PC 19 ROSS:
Delivery Note: DN-ROSS-001
Items:
- กุ้งก้นถ้วย: 0.50 KG
- พริกจินดาแดง: 1.00 KG
Reference: Customer PO ROSS-001
For PC 19 STAFF:
Delivery Note: DN-STAFF-001
Items:
- กุ้งก้นถ้วย: 3.00 KG
Reference: Customer PO STAFF-001
For เบอร์ 10:
Delivery Note: DN-B10-001
Items:
- กุ้งก้นถ้วย: 2.00 KG
Reference: Customer PO B10-001
Supplier: Your Main Supplier Date: 26/05/2568
Item 1: กุ้งก้นถ้วย - 5.50 KG
Customer Allocation Details:
- PC 19 ROSS (MAIN KITCHEN): 0.50 KG (PO: ROSS-26/5/68)
- PC 19 STAFF CANTEEN: 3.00 KG (PO: STAFF-26/5/68)
- เบอร์ 10 ปั่นกะลิบ: 2.00 KG (PO: B10-26/5/68)
Total: 5.50 KG ✓
Item 2: พริกจินดาแดง เด็ดก้าน - 1.00 KG
Customer Allocation Details:
- PC 19 ROSS (MAIN KITCHEN): 1.00 KG (PO: ROSS-26/5/68)
Total: 1.00 KG ✓
Item 3: กิ่งก้นถ้วย - 3.00 KG
Customer Allocation Details:
- PC 19 STAFF CANTEEN: 1.00 KG (PO: STAFF-26/5/68)
- PC 19 STAFF CANTEEN: 2.00 KG (PO: STAFF-26/5/68)
Total: 3.00 KG ✓
Choose Method 3 (Custom Child Table) for the best balance of:
- ✅ Easy to implement (15 minutes setup)
- ✅ Professional appearance
- ✅ Easy to track and manage
- ✅ Can generate reports later
- ✅ No coding required
Total Implementation Time: 15 minutes Maintenance: Zero - use standard Frappe features
This gives you complete customer allocation tracking without any coding!