سامانه صدور فاکتور و حسابداری
fix(qa): treat missing projection status as mismatch using null-safe comparison
davoodmehraban89 committed
Nov 22, 2026 at 09:48 UTC
6c30f4df0bc5fa67b722613df9c70c171309efa2
1 file changed
+2
-2
scripts/sql/draft-conversion-inventory.sql
+2
-2
@@ -122,8 +122,8 @@ with vouchers as (
122
and linked_data->>'status'='posted' and
123
-- A compensating reversal leaves its original voucher posted; the
124
-- business source may legitimately have BOTH projections reversed.
125
- not ((data->>'documentStatus'='posted' and data->>'accountingStatus'='posted')
126
- or (data->>'documentStatus'='reversed' and data->>'accountingStatus'='reversed'))
125
+ not ((data->>'documentStatus' is not distinct from 'posted' and data->>'accountingStatus' is not distinct from 'posted')
126
+ or (data->>'documentStatus' is not distinct from 'reversed' and data->>'accountingStatus' is not distinct from 'reversed'))
127
) posted_projection_mismatches
128
from source_observations
129
), generated_health as (