Commit graph

5 commits

Author SHA1 Message Date
d48a2f063f chore: Bump version to 1.2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:14:37 +01:00
886021bdd5 fix: Add timeout and user fallback for cronjob safety
- set_time_limit(300) prevents infinite SMTP hangs
- Fallback to admin user if $user is empty in cronjob context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:14:14 +01:00
94356a92da fix: Fatal error in mail sender accessing $conf->global
Replace $conf->global->MAIN_INFO_SOCIETE_MAIL with getDolGlobalString()
to prevent fatal error when constant is not set. This caused the
cronjob to hang on the productive server.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:13:05 +01:00
af137e7d83 fix: Add try-catch to prevent cronjob from hanging
- Wrap updatePrices() in try-catch for fatal errors
- Separate try-catch for GlobalNotify and mail sending
- Prevents SMTP timeouts from blocking the entire cronjob

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:07:48 +01:00
c478e5003b feat: Initial release of PreisBot module v1.0
Automatic sales price adjustment based on purchase prices and profit margin.

Features:
- Weekly cronjob for automatic price updates
- Configurable price source (cheapest/newest supplier)
- Configurable price direction (increase only / both)
- Minimum margin setting (default 20%)
- GlobalNotify integration for dashboard notifications
- Email reports with detailed price changes
- Extrafield "Gewinnaufschlag %" on products
- Price history entries with "PreisBot" label

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 12:13:44 +01:00