feat: Enhance InPost service selection and handling in Allegro settings
- Added a check for available InPost services and display a message if none are found. - Updated the InPost service selection dropdown to include additional data attributes for better handling in JavaScript. - Improved JavaScript event handling for InPost service selection to correctly populate hidden fields with selected service data. feat: Introduce Cash on Delivery (COD) functionality in shipment preparation - Added a new input field for specifying the COD amount and currency in the shipment preparation view. - Updated the shipment creation logic to handle COD amounts correctly when creating shipments. refactor: Update OrdersController to include shipment package repository - Modified the OrdersController to accept a ShipmentPackageRepository for better management of shipment-related data. - Enhanced order details to include shipment package information. fix: Ensure internal order numbers are generated upon order creation - Updated the OrderImportRepository to generate and store internal order numbers when a new order is created. feat: Implement status synchronization for Allegro orders - Introduced a new service for syncing order statuses from Allegro to the internal system. - Added logic to fetch and process orders needing status updates, handling errors gracefully. chore: Clean up InPost service definitions in AllegroIntegrationController - Removed hardcoded InPost service definitions and replaced them with dynamic fetching based on available services. feat: Add activity logging for shipment actions - Implemented activity logging for various shipment actions, including creation, label downloads, and errors, to improve traceability and auditing.
This commit is contained in:
@@ -106,7 +106,12 @@ final class OrderImportRepository
|
||||
);
|
||||
$statement->execute($this->orderParams($orderData));
|
||||
|
||||
return (int) $this->pdo->lastInsertId();
|
||||
$newId = (int) $this->pdo->lastInsertId();
|
||||
$this->pdo->prepare(
|
||||
"UPDATE orders SET internal_order_number = CONCAT('OP', LPAD(id, 9, '0')) WHERE id = :id AND (internal_order_number IS NULL OR internal_order_number = '')"
|
||||
)->execute(['id' => $newId]);
|
||||
|
||||
return $newId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user