
    j                    >    d dl mZ d dlmZ ddlmZ ddlmZ dd
ZdS )    )annotations)
Connection   )create_alert)MISSING_FX_RULEconnr   returnintc           
         |                      d                                          }|D ]#}t          | ddd|d         t          d           $t	          |          S )Nz~SELECT transaction_id FROM transactions WHERE currency_original != 'CHF' AND (fx_rate_to_chf IS NULL OR fx_status = 'missing')kritischfxtransactiontransaction_idu@   FX-Kurs fehlt für bestätigte oder prüfpflichtige Transaktion.)prioritycategoryentity_type	entity_idrule_idmessage)executefetchallr   r   len)r   rowsrows      l/home/agent/.hermes/worktrees/FinanceManager-current-import-performance/src/jarvis_finance/quality/checks.pycheck_missing_fxr   	   s}    << 	I hjj 	  	
 	
%*+#V	
 	
 	
 	
 	
 t99    N)r   r   r	   r
   )	
__future__r   sqlite3r   alertsr   rulesr   r    r   r   <module>r#      sk    " " " " " "                   " " " " " "     r   