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

Intent ID: 22

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (FACT EXPORTACION TDA00042222 H 19_28_58.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": null,
  "items": [
    {
      "boxes": 1,
      "length": null,
      "variety": "EXPLORER",
      "category": "HB",
      "quantity": 100,
      "box_number": "ITEM001",
      "plantation": null,
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 35.0
    },
    {
      "boxes": 1,
      "length": null,
      "variety": "SALMA",
      "category": "HB",
      "quantity": 75,
      "box_number": "ITEM002",
      "plantation": null,
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 26.25
    },
    {
      "boxes": 1,
      "length": null,
      "variety": "FRUTETO",
      "category": "HB",
      "quantity": 25,
      "box_number": "ITEM003",
      "plantation": null,
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 8.75
    },
    {
      "boxes": 1,
      "length": null,
      "variety": "KAHALA",
      "category": "HB",
      "quantity": 50,
      "box_number": "ITEM004",
      "plantation": null,
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 17.5
    },
    {
      "boxes": 1,
      "length": null,
      "variety": "HERMOSA",
      "category": "HB",
      "quantity": 25,
      "box_number": "ITEM005",
      "plantation": null,
      "unit_price": 0.35,
      "box_marking": "HB",
      "total_price": 8.75
    },
    {
      "boxes": 1,
      "length": null,
      "variety": "PINK XPRESS ION",
      "category": "HB",
      "quantity": 25,
      "box_number": "ITEM006",
      "plantation": null,
      "unit_price": 0.45,
      "box_marking": "HB",
      "total_price": 11.25
    },
    {
      "boxes": 1,
      "length": null,
      "variety": "PRINCESS CROWN",
      "category": "HB",
      "quantity": 25,
      "box_number": "ITEM007",
      "plantation": null,
      "unit_price": 0.5,
      "box_marking": "HB",
      "total_price": 12.5
    },
    {
      "boxes": 1,
      "length": null,
      "variety": "CANDLELIGHT",
      "category": "HB",
      "quantity": 25,
      "box_number": "ITEM008",
      "plantation": null,
      "unit_price": 0.6,
      "box_marking": "HB",
      "total_price": 15.0
    }
  ],
  "country": null,
  "summary": {
    "total_boxes": 8,
    "total_stems": 350,
    "total_amount": 135.0
  },
  "supplier": null,
  "invoice_date": null,
  "invoice_number": null
}
Результат (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