Песочница: PJ DAVE FLORA

Intent ID: 30

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (thazalia-tda 04-04-2026.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": null,
  "items": [
    {
      "boxes": 3,
      "length": "35cms",
      "variety": "Mix",
      "category": "Mix",
      "quantity": 1800,
      "box_number": "BOX1",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 126.0
    },
    {
      "boxes": 1,
      "length": "35cms",
      "variety": "Madam Red",
      "category": null,
      "quantity": 20,
      "box_number": "BOX2",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 1.4
    },
    {
      "boxes": 1,
      "length": "40cms",
      "variety": "Madam Cerise",
      "category": null,
      "quantity": 100,
      "box_number": "BOX3",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": null,
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "40cms",
      "variety": "Smoothie",
      "category": null,
      "quantity": 270,
      "box_number": "BOX4",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": null,
      "total_price": 27.0
    },
    {
      "boxes": 1,
      "length": "40cms",
      "variety": "Rhodos",
      "category": null,
      "quantity": 350,
      "box_number": "BOX5",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 35.0
    },
    {
      "boxes": 5,
      "length": "50cms",
      "variety": "Rhodos",
      "category": null,
      "quantity": 1500,
      "box_number": "BOX6",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 195.0
    },
    {
      "boxes": 1,
      "length": "40cms",
      "variety": "Madam Cerise",
      "category": null,
      "quantity": 120,
      "box_number": "BOX7",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 12.0
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Babe",
      "category": null,
      "quantity": 90,
      "box_number": "BOX8",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 31.5
    },
    {
      "boxes": 1,
      "length": "50cm",
      "variety": "Leila",
      "category": null,
      "quantity": 60,
      "box_number": "BOX9",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 21.0
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Fire Works",
      "category": null,
      "quantity": 390,
      "box_number": "BOX10",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": "Zim-99x40x25",
      "total_price": 136.5
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Lianne",
      "category": null,
      "quantity": 40,
      "box_number": "BOX11",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": "Zim-99x40x25",
      "total_price": 14.0
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Mirabel",
      "category": null,
      "quantity": 20,
      "box_number": "BOX12",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 7.0
    },
    {
      "boxes": 1,
      "length": "70Cms",
      "variety": "Spray Mix",
      "category": "Spray",
      "quantity": 40,
      "box_number": "BOX13",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.6,
      "box_marking": null,
      "total_price": 24.0
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Odilia",
      "category": null,
      "quantity": 50,
      "box_number": "BOX14",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 17.5
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Reflex",
      "category": null,
      "quantity": 170,
      "box_number": "BOX15",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 59.5
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Salinero",
      "category": null,
      "quantity": 180,
      "box_number": "BOX16",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": "Std-100x33x20",
      "total_price": 63.0
    },
    {
      "boxes": 14,
      "length": "50cms",
      "variety": "Snow Flake",
      "category": null,
      "quantity": 30,
      "box_number": "BOX17",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 10.5
    }
  ],
  "country": "KENYA",
  "summary": {
    "total_boxes": null,
    "total_stems": null,
    "total_amount": 790.9
  },
  "supplier": "P.J. Dave Flora Limited",
  "invoice_date": "04.04.2026",
  "invoice_number": null,
  "processing_report": {
    "notes": "Плоский тип инвойса. Обнаружено 37 физических коробок (sum(items[].boxes)). Некоторые ключевые данные (invoice_number, awb, summary totals) не удалось извлечь по заданным правилам, либо правила не соответствовали структуре OCR данных. Раскрытие мультибокса не применялось, каждая строка OCR соответствует одной позиции товара, количество коробок в items[].boxes.",
    "status": "warning",
    "sum_boxes": 37,
    "sum_stems": 5300,
    "sum_amount": 790.9,
    "items_count": 17,
    "discrepancies": [
      "invoice_number: Rule 'найти строку, где колонка 1 содержит 'Invoice', а колонка 4 содержит 'No.', взять значение из колонки 7 и колонки 9' did not match any data.",
      "invoice_date: Rule 'найти строку, где колонка 2 содержит 'Date', взять значение из колонки 7' did not match any data; value taken from metadata.",
      "awb: Rule 'найти строку, где колонка 8 содержит 'AWB NO.', взять значение из колонки 10' did not match any data.",
      "summary.total_boxes: Rule 'найти строку, где колонка 5 содержит 'TOTAL', взять значение из колонки 6 ('Bxs')' did not match any data.",
      "summary.total_stems: Rule 'найти строку, где колонка 5 содержит 'TOTAL', взять значение из колонки 8 ('Qty')' did not match any data.",
      "summary.total_amount: Rule 'найти строку, где колонка 0 содержит 'TOTAL' и колонка 2 содержит 'EUR', взять значение из колонки 2' did not match OCR structure. Value extracted from column 'Total' (OCR index 10) of matching row."
    ],
    "expected_boxes": null,
    "expected_stems": null,
    "expected_amount": 790.9
  }
}
Результат (Pass 2)
Report: ok
items=23, boxes=23/14.0, stems=5230.0/5230.0, amount=790.9/790.9
discrepancies: summary.total_boxes (14.0) does not match sum(items[].boxes) (23). This may indicate that the 'Bxs' column was used to multiply the quantity per box, but the sum of boxes in summary refers to a higher level aggregation or a different metric of physical boxes than what was unrolled to individual line items.
notes: Инвойс плоский (Б), каждая строка соответствует одной позиции (коробке), мультибокс раскрыт в отдельные позиции. Обнаружено 14 физических коробок (из итога), 23 уникальных item (после раскрытия Bxs). Проблем при извлечении не обнаружено. Раскрытие мультибокса применялось (каждый item имеет boxes=1, количество item соответствует сумме Bxs).
{
  "awb": null,
  "items": [
    {
      "boxes": 1,
      "length": "35cms",
      "variety": "Mix",
      "category": null,
      "quantity": 600.0,
      "box_number": "BOX1",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 42.0
    },
    {
      "boxes": 1,
      "length": "35cms",
      "variety": "Mix",
      "category": null,
      "quantity": 600.0,
      "box_number": "BOX2",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 42.0
    },
    {
      "boxes": 1,
      "length": "35cms",
      "variety": "Mix",
      "category": null,
      "quantity": 600.0,
      "box_number": "BOX3",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 42.0
    },
    {
      "boxes": 1,
      "length": "35cms",
      "variety": "Madam Red",
      "category": null,
      "quantity": 20.0,
      "box_number": "BOX4",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 1.4
    },
    {
      "boxes": 1,
      "length": "40cms",
      "variety": "Madam Cerise",
      "category": null,
      "quantity": 100.0,
      "box_number": "BOX5",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": null,
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "40cms",
      "variety": "Smoothie",
      "category": null,
      "quantity": 270.0,
      "box_number": "BOX6",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": null,
      "total_price": 27.0
    },
    {
      "boxes": 1,
      "length": "4.5 cm",
      "variety": "Rhodos",
      "category": null,
      "quantity": 350.0,
      "box_number": "BOX7",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Std-100x33x20",
      "total_price": 35.0
    },
    {
      "boxes": 1,
      "length": "4.5 cm",
      "variety": "Rhodos",
      "category": null,
      "quantity": 300.0,
      "box_number": "BOX8",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 39.0
    },
    {
      "boxes": 1,
      "length": "4.5 cm",
      "variety": "Rhodos",
      "category": null,
      "quantity": 300.0,
      "box_number": "BOX9",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 39.0
    },
    {
      "boxes": 1,
      "length": "4.5 cm",
      "variety": "Rhodos",
      "category": null,
      "quantity": 300.0,
      "box_number": "BOX10",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 39.0
    },
    {
      "boxes": 1,
      "length": "4.5 cm",
      "variety": "Rhodos",
      "category": null,
      "quantity": 300.0,
      "box_number": "BOX11",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 39.0
    },
    {
      "boxes": 1,
      "length": "4.5 cm",
      "variety": "Rhodos",
      "category": null,
      "quantity": 300.0,
      "box_number": "BOX12",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 39.0
    },
    {
      "boxes": 1,
      "length": "40cms",
      "variety": "Madam Cerise",
      "category": null,
      "quantity": 120.0,
      "box_number": "BOX13",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Std-100x33x20",
      "total_price": 12.0
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Babe",
      "category": null,
      "quantity": 90.0,
      "box_number": "BOX14",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 31.5
    },
    {
      "boxes": 1,
      "length": "50cm",
      "variety": "Leila",
      "category": null,
      "quantity": 60.0,
      "box_number": "BOX15",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 21.0
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Fire Works",
      "category": null,
      "quantity": 390.0,
      "box_number": "BOX16",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": "Jumbo-100x47x27",
      "total_price": 136.5
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Lianne",
      "category": null,
      "quantity": 40.0,
      "box_number": "BOX17",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": "Zim-99x40x25",
      "total_price": 14.0
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Mirabel",
      "category": null,
      "quantity": 20.0,
      "box_number": "BOX18",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 7.0
    },
    {
      "boxes": 1,
      "length": "70Cms",
      "variety": "Spray Mix",
      "category": null,
      "quantity": 40.0,
      "box_number": "BOX19",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.6,
      "box_marking": null,
      "total_price": 24.0
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Odilia",
      "category": null,
      "quantity": 50.0,
      "box_number": "BOX20",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 17.5
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Reflex",
      "category": null,
      "quantity": 170.0,
      "box_number": "BOX21",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 59.5
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "Salinero",
      "category": null,
      "quantity": 180.0,
      "box_number": "BOX22",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": "Std-100x33x20",
      "total_price": 63.0
    },
    {
      "boxes": 1,
      "length": "50cms",
      "variety": "SnowFlake",
      "category": null,
      "quantity": 30.0,
      "box_number": "BOX23",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.35,
      "box_marking": null,
      "total_price": 10.5
    }
  ],
  "country": "KENYA",
  "summary": {
    "total_boxes": 14.0,
    "total_stems": 5230.0,
    "total_amount": 790.9
  },
  "supplier": "P.J. Dave Flora Limited",
  "invoice_date": "20.02.2026",
  "invoice_number": "FINV92396",
  "processing_report": {
    "notes": "Инвойс плоский (Б), каждая строка соответствует одной позиции (коробке), мультибокс раскрыт в отдельные позиции. Обнаружено 14 физических коробок (из итога), 23 уникальных item (после раскрытия Bxs). Проблем при извлечении не обнаружено. Раскрытие мультибокса применялось (каждый item имеет boxes=1, количество item соответствует сумме Bxs).",
    "status": "ok",
    "sum_boxes": 23,
    "sum_stems": 5230.0,
    "sum_amount": 790.9,
    "items_count": 23,
    "discrepancies": [
      "summary.total_boxes (14.0) does not match sum(items[].boxes) (23). This may indicate that the 'Bxs' column was used to multiply the quantity per box, but the sum of boxes in summary refers to a higher level aggregation or a different metric of physical boxes than what was unrolled to individual line items."
    ],
    "expected_boxes": 14.0,
    "expected_stems": 5230.0,
    "expected_amount": 790.9
  }
}
История (последние 20)
ID Файл Дата
43 THAZALIA 20.02.2026.T (1).pdf 2026-02-24 11:28:42.785275+00:00 Excel
41 THAZALIA 20.02.2026.T (1).pdf 2026-02-24 05:40:13.580898+00:00 Excel
23 THAZALIA 20.02.2026.T (1).pdf 2026-02-23 17:05:18.312088+00:00 Excel
15 THAZALIA 20.02.2026.T.pdf 2026-02-23 16:30:11.913795+00:00 Excel