'use strict';
const { createNormalizer } = require('./base-normalizer');
module.exports = createNormalizer('waste_movement', {
  canonical: (row) => ({
    reason_id: row.reason_id,
    quantity: row.cantidad,
    estimated_cost: row.costo,
    operator_user_id: row.operator_user_id,
    warehouse_id: row.warehouse_id,
    occurred_at: row.fecha,
    inventory_movement_type: 'salida_por_merma',
    product_id: row.idproducto || null,
    supply_id: row.idinsumo || null,
  }),
});
