Песочница: OSCAR VALENCIA

Intent ID: 22

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (FACT EXPORTACION TDA00043318 H 16_26_22.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": null,
  "items": [
    {
      "boxes": 1.0,
      "length": "60",
      "variety": "CANDLELIGHT",
      "category": ".00",
      "quantity": 350.0,
      "box_number": "1",
      "plantation": "",
      "unit_price": 0.4,
      "box_marking": "HB",
      "total_price": 140.0
    },
    {
      "boxes": 2.0,
      "length": "50",
      "variety": "MAGIC TIMES",
      "category": ".00",
      "quantity": 100.0,
      "box_number": "2",
      "plantation": "",
      "unit_price": 0.3,
      "box_marking": "HB",
      "total_price": 30.0
    },
    {
      "boxes": 2.0,
      "length": "60",
      "variety": "MAGIC TIMES",
      "category": ".00",
      "quantity": 100.0,
      "box_number": "2",
      "plantation": "",
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 35.0
    },
    {
      "boxes": 2.0,
      "length": "60",
      "variety": "PINK FLOYD",
      "category": ".00",
      "quantity": 100.0,
      "box_number": "2",
      "plantation": "",
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 35.0
    }
  ],
  "country": "Ecuador",
  "summary": {
    "total_boxes": 7.0,
    "total_stems": 650.0,
    "total_amount": 240.0
  },
  "supplier": "VALENCIA PUJOTA JAIME",
  "invoice_date": null,
  "invoice_number": "00043318",
  "processing_report": {
    "notes": "Тип инвойса: плоский. Обнаружено 7 физических коробок. Проблем при извлечении не обнаружено. Раскрытие мультибокса не применялось.",
    "status": "ok",
    "sum_boxes": 7.0,
    "sum_stems": 650.0,
    "sum_amount": 240.0,
    "items_count": 4,
    "discrepancies": [],
    "expected_boxes": 7.0,
    "expected_stems": 650.0,
    "expected_amount": 240.0
  }
}
Результат (Pass 2)
Report: warning
items=8, boxes=8.0/14.0, stems=350.0/350.0, amount=135.0/135.0
discrepancies: Calculated total boxes (8.0) does not match expected total boxes (14.0).
notes: Плоский тип инвойса. Обнаружено 8 физических коробок. Расхождение в количестве коробок между суммой позиций и итоговым значением. Раскрытие мультибокса не применялось.
{
  "awb": null,
  "items": [
    {
      "boxes": 1.0,
      "length": "60",
      "variety": "EXPLORER",
      "category": ".00",
      "quantity": 100.0,
      "box_number": "1",
      "plantation": "",
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 35.0
    },
    {
      "boxes": 1.0,
      "length": "70",
      "variety": "SALMA",
      "category": ".00",
      "quantity": 75.0,
      "box_number": "1",
      "plantation": "",
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 26.25
    },
    {
      "boxes": 1.0,
      "length": "60",
      "variety": "FRUTETO",
      "category": ".00",
      "quantity": 25.0,
      "box_number": "1",
      "plantation": "",
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 8.75
    },
    {
      "boxes": 1.0,
      "length": "60",
      "variety": "KAHALA",
      "category": ".00",
      "quantity": 50.0,
      "box_number": "1",
      "plantation": "",
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 17.5
    },
    {
      "boxes": 1.0,
      "length": "60",
      "variety": "HERMOSA",
      "category": ".00",
      "quantity": 25.0,
      "box_number": "1",
      "plantation": "",
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 8.75
    },
    {
      "boxes": 1.0,
      "length": "60",
      "variety": "PINK XPRESSION",
      "category": ".00",
      "quantity": 25.0,
      "box_number": "1",
      "plantation": "",
      "unit_price": 0.45,
      "box_marking": "HB",
      "total_price": 11.25
    },
    {
      "boxes": 1.0,
      "length": "60",
      "variety": "PRINCESS CROWN",
      "category": ".00",
      "quantity": 25.0,
      "box_number": "1",
      "plantation": "",
      "unit_price": 0.5,
      "box_marking": "HB",
      "total_price": 12.5
    },
    {
      "boxes": 1.0,
      "length": "60",
      "variety": "CANDLELIGHT",
      "category": ".00",
      "quantity": 25.0,
      "box_number": "1",
      "plantation": "",
      "unit_price": 0.6,
      "box_marking": "HB",
      "total_price": 15.0
    }
  ],
  "country": "Ecuador",
  "summary": {
    "total_boxes": 14.0,
    "total_stems": 350.0,
    "total_amount": 135.0
  },
  "supplier": "VALENCIA PUJOTA JAIME",
  "invoice_date": null,
  "invoice_number": "276",
  "processing_report": {
    "notes": "Плоский тип инвойса. Обнаружено 8 физических коробок. Расхождение в количестве коробок между суммой позиций и итоговым значением. Раскрытие мультибокса не применялось.",
    "status": "warning",
    "sum_boxes": 8.0,
    "sum_stems": 350.0,
    "sum_amount": 135.0,
    "items_count": 8,
    "discrepancies": [
      "Calculated total boxes (8.0) does not match expected total boxes (14.0)."
    ],
    "expected_boxes": 14.0,
    "expected_stems": 350.0,
    "expected_amount": 135.0
  }
}
История (последние 20)
ID Файл Дата
29 FACT EXPORTACION TDA00042222 H 19_28_58.pdf 2026-02-23 17:17:33.211191+00:00 Excel