diff --git a/lib/features/products/presentation/pages/product_detail_page.dart b/lib/features/products/presentation/pages/product_detail_page.dart index 8c69d66..56c0bc7 100644 --- a/lib/features/products/presentation/pages/product_detail_page.dart +++ b/lib/features/products/presentation/pages/product_detail_page.dart @@ -787,6 +787,9 @@ class _ProductDetailPageState extends ConsumerState { return; } + // Print before saving to API + await _printQuantities(stage); + // Show loading dialog showDialog( context: context, @@ -865,16 +868,6 @@ class _ProductDetailPageState extends ConsumerState { widget.productId, ); - // Get updated stage data - final updatedStages = ref.read(productDetailProvider(_providerKey)).stages; - final updatedStage = updatedStages.firstWhere( - (s) => s.productStageId == stage.productStageId, - orElse: () => stage, - ); - - // Automatically print after successful save - await _printQuantities(updatedStage); - // Do NOT clear quantity/weight fields - keep them for reference // User can manually clear them if needed using the 'C' button }