diff --git a/westech_r2/api/__pycache__/__init__.cpython-312.pyc b/westech_r2/api/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..5dd511c Binary files /dev/null and b/westech_r2/api/__pycache__/__init__.cpython-312.pyc differ diff --git a/westech_r2/api/__pycache__/optimize_routes.cpython-312.pyc b/westech_r2/api/__pycache__/optimize_routes.cpython-312.pyc new file mode 100644 index 0000000..2be405b Binary files /dev/null and b/westech_r2/api/__pycache__/optimize_routes.cpython-312.pyc differ diff --git a/westech_r2/api/__pycache__/sales.cpython-312.pyc b/westech_r2/api/__pycache__/sales.cpython-312.pyc new file mode 100644 index 0000000..57d58b9 Binary files /dev/null and b/westech_r2/api/__pycache__/sales.cpython-312.pyc differ diff --git a/westech_r2/api/optimize_routes.py b/westech_r2/api/optimize_routes.py index cfe97d4..53a5d4d 100644 --- a/westech_r2/api/optimize_routes.py +++ b/westech_r2/api/optimize_routes.py @@ -107,3 +107,21 @@ def _calculate_slots(gaylord_sizes_text): slots = size_map.get(size, 1) total += int(count) * slots return total or 1 + + +@frappe.whitelist() +def get_scheduled_pickups(pickup_date=None): + """Get scheduled pickups for a given date.""" + if not pickup_date: + pickup_date = frappe.utils.today() + + pickups = frappe.get_list("Scheduled Pickup", + filters={"pickup_date": pickup_date}, + fields=["name", "customer_number", "company_name", "estimated_items", + "estimated_weight", "gaylord_count", "gaylord_sizes", "slots_needed", + "latitude", "longitude", "stop_order", "truck_profile", "status", + "contact_name", "contact_phone", "address_line", "city", "state", "zip_code"], + order_by="stop_order asc" + ) + + return pickups diff --git a/westech_r2/westech_r2/__pycache__/__init__.cpython-312.pyc b/westech_r2/westech_r2/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..d1a464b Binary files /dev/null and b/westech_r2/westech_r2/__pycache__/__init__.cpython-312.pyc differ