removed console
This commit is contained in:
parent
a59f32db26
commit
70d45cae7b
@ -1718,22 +1718,12 @@ useEffect(() => {
|
||||
|
||||
// If previous cost is 0, return 0 to avoid division by zero
|
||||
if (totalPreviousCost === 0) {
|
||||
// console.log(' Variation Calculation: Previous cost is 0, returning 0% variation');
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Calculate percentage variation
|
||||
const variation = ((totalCurrentCost - totalPreviousCost) / totalPreviousCost) * 100;
|
||||
|
||||
// console.log('Variation Calculation Details:', {
|
||||
// productId: product.id || 'unknown',
|
||||
// previousCosts,
|
||||
// currentCosts,
|
||||
// totalPreviousCost,
|
||||
// totalCurrentCost,
|
||||
// variation: variation.toFixed(2) + '%',
|
||||
// isMandatory: Math.abs(variation) > 10
|
||||
// });
|
||||
|
||||
return variation;
|
||||
};
|
||||
@ -2885,12 +2875,7 @@ useEffect(() => {
|
||||
displayValue={p.unitName || ''}
|
||||
onChange={(e) => {
|
||||
const unitId = e.target.value;
|
||||
// console.log('Unit onChange debug:', {
|
||||
// productId: p.id,
|
||||
// unitId,
|
||||
// unitIdType: typeof unitId,
|
||||
// unitIdIsEmpty: unitId === ''
|
||||
// });
|
||||
|
||||
|
||||
// Use updateProductField to handle both unit and unitName updates
|
||||
updateProductField(p.id, 'unit', unitId, unitOptions);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user