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

Intent ID: 30

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (THAZALIA 27.02.2026...pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": null,
  "items": [
    {
      "boxes": 1,
      "length": "40",
      "variety": "La Belle",
      "category": null,
      "quantity": 500,
      "box_number": "BOX1",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 50.0
    },
    {
      "boxes": 1,
      "length": "40",
      "variety": "Madam Cerise",
      "category": null,
      "quantity": 100,
      "box_number": "BOX2",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": null,
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "40",
      "variety": "Madam Red",
      "category": null,
      "quantity": 600,
      "box_number": "BOX3",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 60.0
    },
    {
      "boxes": 1,
      "length": "40",
      "variety": "Madam Red",
      "category": null,
      "quantity": 600,
      "box_number": "BOX4",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 60.0
    },
    {
      "boxes": 1,
      "length": "40",
      "variety": "Madam Red",
      "category": null,
      "quantity": 600,
      "box_number": "BOX5",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 60.0
    },
    {
      "boxes": 1,
      "length": "35",
      "variety": "Mix",
      "category": null,
      "quantity": 600,
      "box_number": "BOX6",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 42.0
    },
    {
      "boxes": 1,
      "length": "35",
      "variety": "Mix",
      "category": null,
      "quantity": 600,
      "box_number": "BOX7",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 42.0
    },
    {
      "boxes": 1,
      "length": "35",
      "variety": "Mix",
      "category": null,
      "quantity": 600,
      "box_number": "BOX8",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 42.0
    },
    {
      "boxes": 1,
      "length": "35",
      "variety": "Mix",
      "category": null,
      "quantity": 600,
      "box_number": "BOX9",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 42.0
    },
    {
      "boxes": 1,
      "length": "35",
      "variety": "Mix",
      "category": null,
      "quantity": 600,
      "box_number": "BOX10",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 42.0
    },
    {
      "boxes": 1,
      "length": "35",
      "variety": "Mix",
      "category": null,
      "quantity": 600,
      "box_number": "BOX11",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.07,
      "box_marking": "Zim-99x40x25",
      "total_price": 42.0
    },
    {
      "boxes": 1,
      "length": "4.5",
      "variety": "Rhodos",
      "category": null,
      "quantity": 360,
      "box_number": "BOX12",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 46.8
    },
    {
      "boxes": 1,
      "length": "4.5",
      "variety": "Rhodos",
      "category": null,
      "quantity": 360,
      "box_number": "BOX13",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 46.8
    },
    {
      "boxes": 1,
      "length": "4.5",
      "variety": "Rhodos",
      "category": null,
      "quantity": 360,
      "box_number": "BOX14",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 46.8
    },
    {
      "boxes": 1,
      "length": "4.5",
      "variety": "Rhodos",
      "category": null,
      "quantity": 360,
      "box_number": "BOX15",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 46.8
    },
    {
      "boxes": 1,
      "length": "4.5",
      "variety": "Rhodos",
      "category": null,
      "quantity": 360,
      "box_number": "BOX16",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 46.8
    },
    {
      "boxes": 1,
      "length": "4.5",
      "variety": "Rhodos",
      "category": null,
      "quantity": 360,
      "box_number": "BOX17",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 46.8
    },
    {
      "boxes": 1,
      "length": "4.5",
      "variety": "Rhodos",
      "category": null,
      "quantity": 360,
      "box_number": "BOX18",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 46.8
    },
    {
      "boxes": 1,
      "length": "4.5",
      "variety": "Rhodos",
      "category": null,
      "quantity": 360,
      "box_number": "BOX19",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 46.8
    },
    {
      "boxes": 1,
      "length": "4.5",
      "variety": "Rhodos",
      "category": null,
      "quantity": 360,
      "box_number": "BOX20",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 46.8
    },
    {
      "boxes": 1,
      "length": "4.5",
      "variety": "Rhodos",
      "category": null,
      "quantity": 360,
      "box_number": "BOX21",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.13,
      "box_marking": "Zim-99x40x25",
      "total_price": 46.8
    },
    {
      "boxes": 1,
      "length": "40",
      "variety": "Athena",
      "category": null,
      "quantity": 600,
      "box_number": "BOX22",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 60.0
    },
    {
      "boxes": 1,
      "length": "40",
      "variety": "Athena",
      "category": null,
      "quantity": 600,
      "box_number": "BOX23",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 60.0
    },
    {
      "boxes": 1,
      "length": "40",
      "variety": "Athena",
      "category": null,
      "quantity": 600,
      "box_number": "BOX24",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 60.0
    },
    {
      "boxes": 1,
      "length": "40",
      "variety": "Athena",
      "category": null,
      "quantity": 600,
      "box_number": "BOX25",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 60.0
    },
    {
      "boxes": 1,
      "length": "40",
      "variety": "Athena",
      "category": null,
      "quantity": 600,
      "box_number": "BOX26",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 60.0
    },
    {
      "boxes": 1,
      "length": "40",
      "variety": "Smoothie",
      "category": null,
      "quantity": 600,
      "box_number": "BOX27",
      "plantation": "P.J. Dave Flora Limited",
      "unit_price": 0.1,
      "box_marking": "Zim-99x40x25",
      "total_price": 60.0
    }
  ],
  "country": "KENYA",
  "summary": {
    "total_boxes": 26,
    "total_stems": 13200,
    "total_amount": 1320.0
  },
  "supplier": "P.J. Dave Flora Limited",
  "invoice_date": "27.02.2026",
  "invoice_number": "FINV92615",
  "processing_report": {
    "notes": "Invoice type: flat. 27 physical boxes detected. Multi-box expansion was applied based on the 'Bxs' column. There is a discrepancy in the total number of boxes.",
    "status": "warning",
    "sum_boxes": 27,
    "sum_stems": 13200,
    "sum_amount": 1320.0,
    "items_count": 27,
    "discrepancies": [
      "Total boxes calculated from items (27) does not match summary total_boxes (26).",
      "Number of unique box_number (27) does not match total items count (27)."
    ],
    "expected_boxes": 26,
    "expected_stems": 13200,
    "expected_amount": 1320.0
  }
}
Результат (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