This commit is contained in:
2026-02-11 08:20:23 +01:00
parent d88a9f204c
commit 878588d567
2 changed files with 3 additions and 3 deletions

View File

@@ -105,7 +105,6 @@ class WeightReport(ModelSQL, ModelView):
return None
report['report_date'] = parse_date(report_data.get('date', ''))
report['weight_date'] = parse_date(report_data.get('weight_date', ''))
logger.info("RETRUN_DATE:%s",report['weight_date'])
# 3. Contract Information
contract_data = json_data.get('contract', {})
@@ -193,6 +192,7 @@ class WeightReport(ModelSQL, ModelView):
gain_loss_percent = Decimal(str(weights_data.get('gain_loss_percent', 0) or 0))
# Arrondir à 2 décimales
report['weight_date'] = parse_date(weights_data.get('weight_date', ''))
report['gross_landed_kg'] = gross.quantize(Decimal('0.01'), rounding=ROUND_HALF_UP)
report['tare_kg'] = tare.quantize(Decimal('0.01'), rounding=ROUND_HALF_UP)
report['net_landed_kg'] = net.quantize(Decimal('0.01'), rounding=ROUND_HALF_UP)