Checkpoint: Correctifs validés en sandbox : retour contextuel depuis le détail vers Factures BAP avec filtres et tri conservés, et nouvelle action Abonnement Oui/Non/Ne pas modifier dans les automatismes. Ajout de tests de non-régression.
This commit is contained in:
@@ -11,6 +11,7 @@ interface Actions {
|
||||
typeAchat?: string;
|
||||
serviceConcerne?: string;
|
||||
ventilationComptable?: string;
|
||||
isSubscription?: 0 | 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,6 +112,11 @@ export async function applyAutomationRules(
|
||||
updates.ventilationComptable = actions.ventilationComptable;
|
||||
autoFilledFieldsList.push("ventilationComptable");
|
||||
}
|
||||
// 0 est une valeur métier valide : ne jamais la tester par vérité.
|
||||
if (actions.isSubscription !== undefined && updates.isSubscription === undefined) {
|
||||
updates.isSubscription = actions.isSubscription;
|
||||
autoFilledFieldsList.push("isSubscription");
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`[AutomationEngine] Error processing rule ${rule.id}:`, error);
|
||||
|
||||
Reference in New Issue
Block a user