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
//
let mut mat_header = Vec::new();
let mut mat_header = vec!["Name".to_string(), "ProductCode".to_string()];
mat_header.extend(
latest_recipe
.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()) {
// search mat settings for further info
if rpl.productCode.clone().ends_with("0090") {
debug!(
"MAT [{}]: {} --> {} = pow:{:?},sy:{:?}",
rpl.productCode.clone(),
header_idx,
repl.materialPathId.clone(),
repl.powderGram,
repl.syrupGram
);
}
// if rpl.productCode.clone().ends_with("0090") {
// debug!(
// "MAT [{}]: {} --> {} = pow:{:?},sy:{:?}",
// rpl.productCode.clone(),
// header_idx,
// repl.materialPathId.clone(),
// repl.powderGram,
// repl.syrupGram
// );
// }
let mat_setting = latest_recipe
.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 => {
// debug
if rpl.productCode.clone().ends_with("0090") {
println!(
"SYRUP [{}]: {} --> {} = {:?}",
rpl.productCode.clone(),
header_idx,
repl.materialPathId.clone(),
repl.syrupGram
);
}
// if rpl.productCode.clone().ends_with("0090") {
// println!(
// "SYRUP [{}]: {} --> {} = {:?}",
// rpl.productCode.clone(),
// header_idx,
// repl.materialPathId.clone(),
// repl.syrupGram
// );
// }
recipe_brewing_values_only[header_idx] +=
repl.syrupGram.as_i64().unwrap();
}
recipe::MaterialType::Soda => {
println!(
"SODA [{}]: {} --> {} = {:?}",
rpl.productCode.clone(),
header_idx,
repl.materialPathId.clone(),
repl.syrupGram
);
// println!(
// "SODA [{}]: {} --> {} = {:?}",
// rpl.productCode.clone(),
// header_idx,
// repl.materialPathId.clone(),
// repl.syrupGram
// );
recipe_brewing_values_only[header_idx] +=
repl.syrupGram.as_i64().unwrap();