feat: shayegan inbound charges workflow and copper kilogram unit enforcement

This commit is contained in:
2026-11-05 17:15:38 +03:30
parent e65b8053fd
commit 7dd5304638
13 changed files with 787 additions and 18 deletions
+3 -1
View File
@@ -717,6 +717,8 @@ class AssetSummaryService
$meltedWeight = round(Controller::gramsToTradeUnit($meltedGrams), 3);
$totalWeight = round($productWeight + $meltedWeight, 3);
$metalUnit = ((int) $metalId === 3 || $weightUnit === 'کیلوگرم') ? 'کیلوگرم' : $weightUnit;
$totals[] = [
'metal_id' => (int) $metalId,
'metal_label' => self::METAL_LABELS[$metalId] ?? 'فلز',
@@ -724,7 +726,7 @@ class AssetSummaryService
'product_weight' => $productWeight,
'melted_weight' => $meltedWeight,
'total_weight' => $totalWeight,
'unit' => $weightUnit,
'unit' => $metalUnit,
];
}