update guard on get mat definitions
This commit is contained in:
parent
4aa9ab3cfb
commit
05d66feb6f
1 changed files with 4 additions and 2 deletions
|
|
@ -9,6 +9,8 @@ use rayon::iter::{IndexedParallelIterator, IntoParallelRefIterator, ParallelIter
|
|||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::recipe_functions::common::MATERIAL_INTER_GUARD;
|
||||
|
||||
pub trait CommonRecipeTrait {
|
||||
fn insert_comment(&mut self, comment: String);
|
||||
|
||||
|
|
@ -1849,10 +1851,10 @@ impl MaterialSetting {
|
|||
let cc = country_code.unwrap().parse::<i64>().expect("not a number");
|
||||
let mat_num = self.id.clone().as_i64().unwrap();
|
||||
|
||||
let check_if_start_with_cc = mat_num.to_string().starts_with(&format!("{cc}"));
|
||||
let check_if_start_with_cc = mat_num > MATERIAL_INTER_GUARD as i64;
|
||||
|
||||
if check_if_start_with_cc {
|
||||
mat_num - (cc * 10000)
|
||||
mat_num - (cc * MATERIAL_INTER_GUARD as i64)
|
||||
} else {
|
||||
mat_num
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue