سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 23:15 UTC
fix(accounting): avoid duplicate lifecycle post audit
davoodmehraban89 committed
Nov 18, 2026 at 09:07 UTC
70559da654a6b22127110a14450e47fec117cb99
1 file changed
-5
supabase/migrations/20261118100000_journal_document_lifecycle.sql
-5
@@ -304,11 +304,6 @@ BEGIN
304
SET state='posted',posted_at=v_at,posted_by=v_actor
305
WHERE organization_id=p_org AND voucher_id=p_id;
306
307
- INSERT INTO public.finora_journal_document_audit(
308
- atf_number,organization_id,voucher_id,action,old_state,new_state,actor_id,snapshot)
309
- VALUES(v_registry.atf_number,p_org,p_id,'posted','draft','posted',v_actor,
310
- jsonb_build_object('number',v_no,'sourceType',v_src,'sourceId',v.data->>'sourceId'));
311
-
307
PERFORM private.finora_phase1a_audit_event(p_org,p_id,v_actor,'posted','',
308
jsonb_build_object('number',v_no,'sourceType',v_src,'sourceId',v.data->>'sourceId'));
309