commit de compras
This commit is contained in:
@@ -45,7 +45,20 @@ final class IdentityWorkflow
|
||||
$result['context'] = ['company' => $company, 'unit' => $unit, 'units' => $this->units($user->id, $company->tenant_id, $company->id),
|
||||
'token' => $selected['token'], 'grants' => $grants,
|
||||
'modules' => app(\App\Shared\Context\ModuleNavigation::class)->available($this->context),
|
||||
'module_id' => $selected['module_id'] ?? null];
|
||||
'module_id' => $selected['module_id'] ?? null,
|
||||
'geography_enabled'=>app()->environment('budget-testing')&&config('geography.enabled')===true,
|
||||
'stock'=>['period_report'=>app()->environment('budget-testing')&&config('receipt_qa.stock_read_enabled')===true&&config('receipt_qa.stock_period_enabled')===true],
|
||||
'purchasing' => ['internal_requisitions' => app()->environment('budget-testing')
|
||||
&& config('internal_requisitions.qa_enabled') === true,
|
||||
'receipts'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true,
|
||||
'orders'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.orders_enabled')===true,
|
||||
'supplier_obligations'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.obligations_enabled')===true,
|
||||
'supplier_invoices'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.invoices_enabled')===true,
|
||||
'source_requests'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.requests_enabled')===true,
|
||||
'suppliers'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.suppliers_enabled')===true,
|
||||
'sourcing'=>app()->environment('budget-testing')&&config('receipt_qa.enabled')===true&&config('receipt_qa.sourcing_enabled')===true],
|
||||
'accounting' => ['stock_valuation_read' => app()->environment('budget-testing')
|
||||
&& config('stock_ledger.read_sources.'.$selected['tenant_id'].':'.$selected['company_id'].':'.($selected['unit_id']??'')) !== null]];
|
||||
if ($result['context']['module_id'] && !in_array($result['context']['module_id'], array_column($result['context']['modules'], 'id'), true)) {
|
||||
$result['context']['module_id'] = null;
|
||||
$result['context']['token'] = bin2hex(random_bytes(24));
|
||||
|
||||
Reference in New Issue
Block a user