fix missing headers

This commit is contained in:
Pakin 2025-08-04 12:26:26 +07:00
parent 3d268e6d0a
commit 447ec7e78a

View file

@ -355,7 +355,7 @@ pub fn generate_recipe_sheet_table(country_name: &str, into_version: usize) {
// auto detect // auto detect
// //
let mut mat_header = Vec::new(); let mut mat_header = vec!["Name".to_string(), "ProductCode".to_string()];
mat_header.extend( mat_header.extend(
latest_recipe latest_recipe
.MaterialSetting .MaterialSetting
@ -454,16 +454,16 @@ pub fn generate_recipe_sheet_table(country_name: &str, into_version: usize) {
if header_idx > 1 && header.eq(&current_material.to_string()) { if header_idx > 1 && header.eq(&current_material.to_string()) {
// search mat settings for further info // search mat settings for further info
if rpl.productCode.clone().ends_with("0090") { // if rpl.productCode.clone().ends_with("0090") {
debug!( // debug!(
"MAT [{}]: {} --> {} = pow:{:?},sy:{:?}", // "MAT [{}]: {} --> {} = pow:{:?},sy:{:?}",
rpl.productCode.clone(), // rpl.productCode.clone(),
header_idx, // header_idx,
repl.materialPathId.clone(), // repl.materialPathId.clone(),
repl.powderGram, // repl.powderGram,
repl.syrupGram // repl.syrupGram
); // );
} // }
let mat_setting = latest_recipe let mat_setting = latest_recipe
.search_material_settings(current_material.to_string()); .search_material_settings(current_material.to_string());
@ -489,27 +489,27 @@ pub fn generate_recipe_sheet_table(country_name: &str, into_version: usize) {
} }
recipe::MaterialType::Syrup => { recipe::MaterialType::Syrup => {
// debug // debug
if rpl.productCode.clone().ends_with("0090") { // if rpl.productCode.clone().ends_with("0090") {
println!( // println!(
"SYRUP [{}]: {} --> {} = {:?}", // "SYRUP [{}]: {} --> {} = {:?}",
rpl.productCode.clone(), // rpl.productCode.clone(),
header_idx, // header_idx,
repl.materialPathId.clone(), // repl.materialPathId.clone(),
repl.syrupGram // repl.syrupGram
); // );
} // }
recipe_brewing_values_only[header_idx] += recipe_brewing_values_only[header_idx] +=
repl.syrupGram.as_i64().unwrap(); repl.syrupGram.as_i64().unwrap();
} }
recipe::MaterialType::Soda => { recipe::MaterialType::Soda => {
println!( // println!(
"SODA [{}]: {} --> {} = {:?}", // "SODA [{}]: {} --> {} = {:?}",
rpl.productCode.clone(), // rpl.productCode.clone(),
header_idx, // header_idx,
repl.materialPathId.clone(), // repl.materialPathId.clone(),
repl.syrupGram // repl.syrupGram
); // );
recipe_brewing_values_only[header_idx] += recipe_brewing_values_only[header_idx] +=
repl.syrupGram.as_i64().unwrap(); repl.syrupGram.as_i64().unwrap();