commit compras2 2911
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-29 10:48:22 +02:00
parent 448948a487
commit 7da8d6c87a
64 changed files with 2538 additions and 288 deletions
+10 -1
View File
@@ -15,6 +15,12 @@ final class SupplierPayables
{
public static function enabled(): bool
{
if (app(StandaloneRuntime::class)->enabled()) {
return app(StandaloneRuntime::class)->feature('supplier-payables', DB::connection())
&& is_string(config('common-payables.source_instance')) && trim(config('common-payables.source_instance')) !== ''
&& Schema::hasTable('pa_obligations') && Schema::hasTable('pa_access');
}
$isolated = app()->environment(['testing', 'payable-testing']) && DB::connection()->getDriverName() === 'pgsql'
&& (bool) preg_match('/^compras_receipts_test_[a-f0-9]{12}$/D', DB::connection()->getDatabaseName());
@@ -207,7 +213,10 @@ final class SupplierPayables
$engine = $this->engine($u);
$d = $engine->listing(Invoice::query()->where('tenant_id', $u->tenant_id)->pluck('id')->all());
$d['permissions'] = ['prepare' => $this->can($u, 'prepare'), 'validate' => $this->can($u, 'validate')];
$d['payments_available'] = app()->environment('payable-testing') && Schema::hasTable('ps_payments') && $this->can($u, 'payments_view');
$payments = app(StandaloneRuntime::class)->enabled()
? app(StandaloneRuntime::class)->feature('supplier-settlements', DB::connection())
: app()->environment('payable-testing');
$d['payments_available'] = $payments && Schema::hasTable('ps_payments') && $this->can($u, 'payments_view');
$d['history_import_available'] = self::historyEnabled();
$d['history_decisions_available'] = self::historyDecisionsEnabled();