Commit Graph

7 Commits

Author SHA1 Message Date
7a50d2156a Change ROA settings defaults to NULL and remove obsolete script
Changes:
1. Update settings.ini.example with [ROA] section using NULL defaults
2. Modify ApplicationSetup.prg to handle NULL values properly:
   - CreateDefaultIni writes "NULL" string to INI file
   - LoadSettings converts "NULL" string to VFP .NULL. value
3. Update Oracle package defaults from (0, 1, 2) to (NULL, NULL, NULL):
   - p_id_pol DEFAULT NULL
   - p_id_gestiune DEFAULT NULL
   - p_id_sectie DEFAULT NULL
4. Remove obsolete 02_import_parteneri.sql (replaced by 05_pack_import_parteneri.pck)
5. Update local settings.ini with NULL values

Rationale:
- NULL is semantically correct (no policy/gestiune/sectie specified)
- Previous defaults (0, 1, 2) were invalid IDs in ROA system
- Maintains backward compatibility through Oracle DEFAULT NULL

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 00:02:50 +02:00
ef6a318aed Add configurable ROA settings (IdPol, IdGestiune, IdSectie) to VFP integration
Implement global configuration for ROA system IDs via settings.ini:

VFP Changes:
- Add [ROA] section to settings.ini with IdPol, IdGestiune, IdSectie
- Update ApplicationSetup.LoadSettings to read ROA configuration
- Update ApplicationSetup.CreateDefaultIni with default values (0, 1, 2)
- Modify sync-comenzi-web.prg to pass ROA settings to Oracle package

Oracle Package Changes (06_pack_import_comenzi.pck):
- Add optional parameters to importa_comanda signature with defaults
  * p_id_pol (default: 0)
  * p_id_gestiune (default: 1)
  * p_id_sectie (default: 2)
- Remove hardcoded constants (c_id_pol, c_id_sectie, c_id_gestiune)
- Update PACK_COMENZI.adauga_comanda call to use p_id_sectie parameter
- Update PACK_COMENZI.adauga_articol_comanda to use p_id_pol and p_id_sectie

Benefits:
- Flexible configuration without code changes
- Maintains backward compatibility with default values
- Centralized ROA system configuration

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:36:21 +02:00
05bb0b1b01 Reorganize Oracle packages into database-scripts for unified git tracking
Move Oracle package files from docs/ to api/database-scripts/ with sequential numbering:
- PACK_COMENZI.pck → 04_pack_comenzi.pck (renamed with git)
- PACK_IMPORT_PARTENERI.pck → 05_pack_import_parteneri.pck
- PACK_IMPORT_COMENZI.pck → 06_pack_import_comenzi.pck

Remove 04_import_comenzi.sql (replaced by 06_pack_import_comenzi.pck actual version)

Update VFP integration files and project structure.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:32:41 +02:00
5d43509987 Update VFP integration with improved error handling and settings management
- Add output/ directory to .gitignore to exclude generated JSON files
- Fix ApplicationSetup.prg parameter handling with LPARAMETERS and proper validation
- Update gomag-adapter.prg to use global settings object and clean old JSON files
- Enhance sync-comenzi-web.prg with Oracle integration improvements
- Add Visual FoxPro project files (roawebcomenzi.PJT/.pjx)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 17:01:00 +03:00
d1858f86b6 Phase 2 implementation: VFP Integration with Oracle synchronization
Major architectural changes:
- Convert Oracle IMPORT_PARTENERI.cauta_sau_creeaza_partener from FUNCTION to PROCEDURE with OUT parameter for VFP compatibility
- Add IS_PERSOANA_JURIDICA parameter to support individual vs company detection
- Implement sync-comenzi-web.prg orchestrator for generic web order processing with 5-minute timer automation
- Create ApplicationSetup class for proper object-oriented configuration management
- Add comprehensive Oracle connection and sync settings via settings.ini configuration system
- Implement generic web order processing functions (ProcessWebOrder, ValidateWebOrder, CleanWebText, ConvertWebDate)
- Add proper VFP-Oracle integration with correct procedure call syntax using OUT parameters
- Rename gomag-vending.prg to gomag-adapter.prg for clarity and platform-specific functionality
- Move CheckIniFile function to utils.prg for better code organization
- Add settings.ini.example template and update .gitignore to exclude actual settings files
- Implement comprehensive logging system with rotation and error handling
- Add connection validation and retry logic for robust Oracle integration

Technical improvements:
- Proper JSON processing integration with existing nfjson library
- Comprehensive error handling with categorized logging (INFO, ERROR, WARN)
- Timer-based automation with configurable intervals
- Settings validation and default value creation
- Generic function naming for multi-platform support
- Class-based setup system replacing procedural approach

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 16:01:42 +03:00
461b26e8a7 Actualizare documentatie si plan pentru VFP Orchestrator
- CLAUDE.md: Actualizare completa cu architecture multi-tier si status project
- PRD.md: Adaugat plan detaliat pentru sync-comenzi-web.prg cu:
  * Flux complet de procesare (input/output/logging)
  * Helper functions necesare (CleanGoMagText, BuildArticlesJSON, etc.)
  * Cod complet pentru procesarea articolelor GoMag → Oracle
  * Gestionare cazuri speciale (shipping/billing/discounts)
  * Mapare detaliata Phase 2 cu P2-001 prin P2-004
- LLM_PROJECT_MANAGER_PROMPT.md: Update comenzi disponibile

Phase 1 Database Foundation: 75% complete, ready for P1-004 testing
Phase 2 VFP Integration: Fully planned, ready for implementation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 20:33:31 +03:00
3a234b5240 Remove FXP files from tracking and update gitignore
- Remove nfjson/nfjsonread.FXP from git tracking
- Add Python cache patterns (__pycache__/, *.py[cod], *$py.class)
- Add environment file patterns (.env, .env.local, .env.*.local)
- Reorganize project structure with VFP files moved to vfp/ directory
- Add comprehensive database scripts and documentation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 19:38:31 +03:00