commit melhorias sgf

This commit is contained in:
2026-11-11 09:00:17 +02:00
parent 0b05a1192c
commit 1d11a5e57b
736 changed files with 40746 additions and 210 deletions
+2
View File
@@ -0,0 +1,2 @@
<?php
$book=$argv[1]??'regression';require __DIR__.'/sgf-single-bootstrap.php';$native->transaction(function()use($native,$f){$s=$f['scope'];$id=$native->table('gl_accounts')->where($s)->where('code','QA-REDUCAO-CLIENTE')->value('id');if(!$id)$id=$native->table('gl_accounts')->insertGetId($s+['code'=>'QA-REDUCAO-CLIENTE','label'=>'Redução nominal de cliente exclusivamente QA','currency'=>'MZN','is_movement'=>true]);if(!$native->table('gl_rules')->where($s)->where('rule_key','receivable.reduced')->exists())$native->table('gl_rules')->insert($s+['rule_key'=>'receivable.reduced','effect_type'=>'receivable.reduced','version'=>1,'policy'=>'QA-SALES-JOURNAL-v1','currency'=>'MZN','valid_from'=>'2026-01-01','valid_to'=>'2026-12-31','debit_account_id'=>$id,'credit_account_id'=>$native->table('gl_accounts')->where($s)->where('code','QA-CLIENTES')->value('id'),'created_by'=>4,'reason'=>'Crédito nominal100MZN de nova origem QA autorizado no bloco documental.','created_at'=>now()]);});echo json_encode(['passed'=>true,'book'=>$book,'journals_unchanged'=>true]).PHP_EOL;