feat(partner): detect and resync partner mismatches on already-imported orders
Detects PF↔PJ transitions and CUI changes after import; auto-resyncs uninvoiced orders (max 5/cycle) and shows visual alert for invoiced ones. - SQLite: partner_mismatch column + batch helpers - sync_service: detection loop + _resync_partner_for_order - dashboard: red dot + attention card indicator - modal: alert with contextual message and resync button Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -353,6 +353,7 @@ def init_sqlite():
|
||||
("anaf_denumire_mismatch", "INTEGER DEFAULT 0"),
|
||||
("denumire_anaf", "TEXT"),
|
||||
("address_mismatch", "INTEGER DEFAULT 0"),
|
||||
("partner_mismatch", "INTEGER DEFAULT 0"),
|
||||
]:
|
||||
if col not in order_cols:
|
||||
conn.execute(f"ALTER TABLE orders ADD COLUMN {col} {typedef}")
|
||||
|
||||
Reference in New Issue
Block a user