Песочница: Puliza

Intent ID: 28

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (FACT EXPORTACION TDA00036537 H 15_21_16.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": null,
  "items": [
    {
      "boxes": 1,
      "length": "50",
      "variety": "MIXTO",
      "category": "Mixed",
      "quantity": 350,
      "box_number": "PUL1",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.25,
      "box_marking": "HB",
      "total_price": 87.5
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "EXPLORER",
      "category": null,
      "quantity": 200,
      "box_number": "PUL2",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.18,
      "box_marking": "HB",
      "total_price": 36.0
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "EXPLORER",
      "category": null,
      "quantity": 200,
      "box_number": "PUL3",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.18,
      "box_marking": "HB",
      "total_price": 36.0
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "EXPLORER",
      "category": null,
      "quantity": 133.33,
      "box_number": "PUL4",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.18,
      "box_marking": "HB",
      "total_price": 24.0
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "EXPLORER",
      "category": null,
      "quantity": 133.33,
      "box_number": "PUL5",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.18,
      "box_marking": "HB",
      "total_price": 24.0
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "EXPLORER",
      "category": null,
      "quantity": 133.34,
      "box_number": "PUL6",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.18,
      "box_marking": "HB",
      "total_price": 24.0
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "MAGIC TIMES",
      "category": null,
      "quantity": 56.25,
      "box_number": "PUL7",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.21,
      "box_marking": "HB",
      "total_price": 11.81
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "MAGIC TIMES",
      "category": null,
      "quantity": 56.25,
      "box_number": "PUL8",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.21,
      "box_marking": "HB",
      "total_price": 11.81
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "MAGIC TIMES",
      "category": null,
      "quantity": 56.25,
      "box_number": "PUL9",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.21,
      "box_marking": "HB",
      "total_price": 11.81
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "MAGIC TIMES",
      "category": null,
      "quantity": 56.25,
      "box_number": "PUL10",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.21,
      "box_marking": "HB",
      "total_price": 11.82
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "PALOMA",
      "category": null,
      "quantity": 43.75,
      "box_number": "PUL11",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.22,
      "box_marking": "HB",
      "total_price": 9.62
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "PALOMA",
      "category": null,
      "quantity": 43.75,
      "box_number": "PUL12",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.22,
      "box_marking": "HB",
      "total_price": 9.62
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "PALOMA",
      "category": null,
      "quantity": 43.75,
      "box_number": "PUL13",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.22,
      "box_marking": "HB",
      "total_price": 9.62
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "PALOMA",
      "category": null,
      "quantity": 43.75,
      "box_number": "PUL14",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.22,
      "box_marking": "HB",
      "total_price": 9.64
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "MIXTO",
      "category": "Mixed",
      "quantity": 80,
      "box_number": "PUL15",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.18,
      "box_marking": "HB",
      "total_price": 14.4
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "MIXTO",
      "category": "Mixed",
      "quantity": 80,
      "box_number": "PUL16",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.18,
      "box_marking": "HB",
      "total_price": 14.4
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "MIXTO",
      "category": "Mixed",
      "quantity": 80,
      "box_number": "PUL17",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.18,
      "box_marking": "HB",
      "total_price": 14.4
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "MIXTO",
      "category": "Mixed",
      "quantity": 80,
      "box_number": "PUL18",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.18,
      "box_marking": "HB",
      "total_price": 14.4
    },
    {
      "boxes": 1,
      "length": "50",
      "variety": "MIXTO",
      "category": "Mixed",
      "quantity": 80,
      "box_number": "PUL19",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.18,
      "box_marking": "HB",
      "total_price": 14.4
    }
  ],
  "country": null,
  "summary": {
    "total_boxes": 2.5,
    "total_stems": 1950,
    "total_amount": 389.25
  },
  "supplier": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
  "invoice_date": null,
  "invoice_number": "00036537",
  "processing_report": {
    "notes": "Invoice type: flat (B). 19 physical boxes detected after multi-box splitting. Multi-box splitting was applied for rows where '# BOX' > 1. The 'TOT.BOX' value in the OCR seems to represent something other than the count of physical boxes, possibly total number of bundles or a different unit. Minor discrepancies found in total stems and total amount due to rounding during split item calculations.",
    "status": "warning",
    "sum_boxes": 19,
    "sum_stems": 1950.05,
    "sum_amount": 389.26,
    "items_count": 19,
    "discrepancies": [
      "summary.total_boxes (2.5) does not match the sum of items' boxes (19). This may indicate that 'TOT.BOX' in the OCR does not refer to the count of physical boxes.",
      "summary.total_stems (1950) has a minor discrepancy with sum(items[].quantity) (1950.05).",
      "summary.total_amount (389.25) has a minor discrepancy with sum(items[].total_price) (389.26)."
    ],
    "expected_boxes": 2.5,
    "expected_stems": 1950,
    "expected_amount": 389.25
  }
}
Результат (Pass 2)
Report: warning
items=1, boxes=1/0.5, stems=350/350, amount=87.5/87.5
discrepancies: Calculated total boxes (1) does not match summary total boxes (0.5).
notes: Тип инвойса: плоский. Обнаружена 1 физическая коробка. Применено раскрытие мультибокса: нет. Проблема при извлечении summary.total_boxes (OCR ошибка).
{
  "awb": null,
  "items": [
    {
      "boxes": 1,
      "length": "50",
      "variety": "MIXTO",
      "category": "MIXTO",
      "quantity": 350,
      "box_number": "PUL1",
      "plantation": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
      "unit_price": 0.25,
      "box_marking": "HB",
      "total_price": 87.5
    }
  ],
  "country": null,
  "summary": {
    "total_boxes": 0.5,
    "total_stems": 350,
    "total_amount": 87.5
  },
  "supplier": "PULIZA FLOWERS CACOANGO CACOANGO JUAN MANUEL",
  "invoice_date": null,
  "invoice_number": "00036192",
  "processing_report": {
    "notes": "Тип инвойса: плоский. Обнаружена 1 физическая коробка. Применено раскрытие мультибокса: нет. Проблема при извлечении summary.total_boxes (OCR ошибка).",
    "status": "warning",
    "sum_boxes": 1,
    "sum_stems": 350,
    "sum_amount": 87.5,
    "items_count": 1,
    "discrepancies": [
      "Calculated total boxes (1) does not match summary total boxes (0.5)."
    ],
    "expected_boxes": 0.5,
    "expected_stems": 350,
    "expected_amount": 87.5
  }
}
История (последние 20)
ID Файл Дата
20 FACT EXPORTACION TDA00036192 H 16_50_18.pdf 2026-02-23 16:56:24.922433+00:00 Excel