From acda7916758473fa20555d4fcce0873f4e044d53 Mon Sep 17 00:00:00 2001 From: Pakin Date: Thu, 16 Oct 2025 09:00:05 +0700 Subject: [PATCH] hotfix - update inter id matching - make full import returns recipe struct --- src/recipe_functions/common.rs | 4 ++-- src/recipe_functions/import.rs | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/recipe_functions/common.rs b/src/recipe_functions/common.rs index b58fe73..1ec2f26 100644 --- a/src/recipe_functions/common.rs +++ b/src/recipe_functions/common.rs @@ -153,7 +153,7 @@ pub fn change_prefix_by_country( if check_allowed_change_mat_prefix(eled.clone().materialPathId) { let curr_id = eled.clone().materialPathId.as_i64().unwrap_or(0); - let new_f = if curr_id > 99999 { + let new_f = if curr_id > 300000 { // is from inter // TODO: reset first @@ -187,7 +187,7 @@ pub fn change_prefix_by_country( if check_allowed_change_mat_prefix(eled.clone().materialPathId) { let curr_id = eled.clone().materialPathId.as_i64().unwrap_or(0); - let new_f = if curr_id > 99999 { + let new_f = if curr_id > 300000 { // is from inter // TODO: reset first diff --git a/src/recipe_functions/import.rs b/src/recipe_functions/import.rs index b7ff5cf..ff863a3 100644 --- a/src/recipe_functions/import.rs +++ b/src/recipe_functions/import.rs @@ -603,7 +603,7 @@ pub fn generate_recipe_sheet_table(country_name: &str, into_version: usize) { /// - MaterialCode /// - Topping /// -pub fn full_import_data(source: Recipe, mut import_target: Recipe) { +pub fn full_import_data(source: Recipe, mut import_target: Recipe) -> Recipe { // import menus source.Recipe01.iter().for_each(|r01| { if !import_target.Recipe01.contains(r01) { @@ -635,4 +635,6 @@ pub fn full_import_data(source: Recipe, mut import_target: Recipe) { import_target.Topping.ToppingGroup.push(tg.clone()); } }); + + import_target }