fix some bugs 4
This commit is contained in:
@@ -95,7 +95,7 @@ class WalletBalanceService
|
||||
$productId = (int) ($this->lineValue($line, 'product_id') ?? 0);
|
||||
$gold = (float) ($this->lineValue($line, 'gold') ?? 0);
|
||||
|
||||
if ($gold <= 0) {
|
||||
if (abs($gold) < 0.0000001) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ class WalletBalanceService
|
||||
}
|
||||
|
||||
$goldGrams = $this->walletLineGoldGrams($line);
|
||||
if ($goldGrams <= 0) {
|
||||
if (abs($goldGrams) < 0.0000001) {
|
||||
return $map;
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ class WalletBalanceService
|
||||
$mainWalletMetalId = $this->resolveMainWalletMetalId();
|
||||
foreach ($this->walletLines($walletLines) as $line) {
|
||||
$goldGrams = $this->walletLineGoldGrams($line);
|
||||
if ($goldGrams <= 0) {
|
||||
if (abs($goldGrams) < 0.0000001) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ class WalletBalanceService
|
||||
private function walletLineGoldGrams(mixed $line): float
|
||||
{
|
||||
$gold = (float) ($this->lineValue($line, 'gold') ?? 0);
|
||||
if ($gold <= 0) {
|
||||
if (abs($gold) < 0.0000001) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user