hotfix
- update inter id matching - make full import returns recipe struct
This commit is contained in:
parent
4670c5f89a
commit
acda791675
2 changed files with 5 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue