Fix minimarket form data handling and Excel template integration

- Ensured minimarket_store_type section is properly generated in config.json
- Form now correctly saves and processes minimarket data when selected
- Excel template integration working for all store types including minimarket

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
andrei
2025-09-24 11:55:00 +00:00
parent 6b25a7ddad
commit ee0bb76f22
5 changed files with 77 additions and 28 deletions

View File

@@ -152,6 +152,11 @@ def update_excel_variables(excel_path):
except Exception as e:
print(f"Error updating cell {cell_ref}: {e}")
# Force formula recalculation before saving
print("Forcing formula recalculation...")
wb.calculation.calcMode = 'auto'
wb.calculation.fullCalcOnLoad = True
# Save the workbook with variables updated
print("Saving workbook with updated variables...")
wb.save(excel_path)
@@ -398,6 +403,11 @@ def update_excel_variables(excel_path):
except Exception as e:
print(f"Error extracting year from sheet name '{sheet_name}': {e}")
# Ensure formulas are marked for recalculation before final save
print("Ensuring formulas are marked for recalculation...")
wb.calculation.calcMode = 'auto'
wb.calculation.fullCalcOnLoad = True
# Save the workbook with updated variables and hidden sheets
print("Saving workbook with all updates...")
wb.save(excel_path)