@@ -260,6 +260,11 @@ final class AgreementOrderLimits
|
||||
|
||||
private function loadArithmetic(): void
|
||||
{
|
||||
if (app(InventoryConversionRuntime::class)->enabled()) {
|
||||
app(ReceiptStockMovement::class)->load();
|
||||
|
||||
return;
|
||||
}
|
||||
$root = base_path('packages/inventory-write/development');
|
||||
$bytes = file_get_contents($root.'/manifest.json');
|
||||
if ($bytes === false || ! hash_equals('90cf565537e7fd48eb54a87bcfd6d585cf53239f075764910047838b3b8b4c38', hash('sha256', $bytes))) {
|
||||
@@ -271,6 +276,9 @@ final class AgreementOrderLimits
|
||||
if (! is_string($hash) || ! hash_equals($manifest['files']['src/QuantityConversion.php'], $hash)) {
|
||||
throw new \LogicException('Aritmética alterada.');
|
||||
}
|
||||
if (class_exists(QuantityConversion::class, false) && realpath((new \ReflectionClass(QuantityConversion::class))->getFileName() ?: '') !== realpath($file)) {
|
||||
throw new \LogicException('COMPRAS_INVENTORY_ARITHMETIC_VERSION');
|
||||
}
|
||||
require_once $file;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user