Песочница: Star Roses

Intent ID: 29

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (Invoice#0000210518-TDA CVGORODRU-.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": "14599817631",
  "items": [
    {
      "boxes": 1,
      "length": "50CM",
      "variety": "CANDLELIGHT",
      "category": "ROSES",
      "quantity": 350,
      "box_number": "1",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.65,
      "box_marking": "H",
      "total_price": 227.5
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "CHECK MATE",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "2",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.45,
      "box_marking": "H",
      "total_price": 22.5
    },
    {
      "boxes": 1,
      "length": "50CM",
      "variety": "MAMMA MIA",
      "category": "ROSES",
      "quantity": 25,
      "box_number": "2",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.4,
      "box_marking": "H",
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "MAMMA MIA",
      "category": "ROSES",
      "quantity": 125,
      "box_number": "2",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.5,
      "box_marking": "H",
      "total_price": 62.5
    },
    {
      "boxes": 1,
      "length": "50CM",
      "variety": "RED PANTHER",
      "category": "ROSES",
      "quantity": 150,
      "box_number": "2",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.5,
      "box_marking": "H",
      "total_price": 75.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "CHARMING VELVET STAR 2",
      "category": "ROSES",
      "quantity": 350,
      "box_number": "3",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 1.0,
      "box_marking": "H",
      "total_price": 350.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "CHARMING VELVET STAR",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "4",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 1.0,
      "box_marking": "H",
      "total_price": 50.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "CHARMING VELVET STAR 2",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "4",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 1.0,
      "box_marking": "H",
      "total_price": 50.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "MELODY STAR",
      "category": "ROSES",
      "quantity": 25,
      "box_number": "4",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.8,
      "box_marking": "H",
      "total_price": 20.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "MOCCA STAR",
      "category": "ROSES",
      "quantity": 125,
      "box_number": "4",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.8,
      "box_marking": "H",
      "total_price": 100.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "SWEET LOVE STAR 6",
      "category": "ROSES",
      "quantity": 100,
      "box_number": "4",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.8,
      "box_marking": "H",
      "total_price": 80.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "SWEET LOVE STAR 6",
      "category": "ROSES",
      "quantity": 350,
      "box_number": "5",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.8,
      "box_marking": "H",
      "total_price": 280.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "SWEET LOVE STAR 6",
      "category": "ROSES",
      "quantity": 25,
      "box_number": "6",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.8,
      "box_marking": "H",
      "total_price": 20.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "UNICORN STAR",
      "category": "ROSES",
      "quantity": 325,
      "box_number": "6",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.8,
      "box_marking": "H",
      "total_price": 260.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "STAR BLACK",
      "category": "ROSES",
      "quantity": 300,
      "box_number": "7",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.8,
      "box_marking": "H",
      "total_price": 240.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "SWEET LOVE STAR 6",
      "category": "ROSES",
      "quantity": 25,
      "box_number": "7",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.8,
      "box_marking": "H",
      "total_price": 20.0
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "STAR BLACK",
      "category": "ROSES",
      "quantity": 300,
      "box_number": "8",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.8,
      "box_marking": "H",
      "total_price": 240.0
    }
  ],
  "country": "KIRGUISTAN",
  "summary": {
    "total_boxes": 109,
    "total_stems": null,
    "total_amount": 2107.5
  },
  "supplier": "EL CAMPANARIO DE SANTA ANITA SCC",
  "invoice_date": "12/03/2026",
  "invoice_number": "055-2026-40-00340115",
  "processing_report": {
    "notes": "Тип инвойса: Б (плоский). Обнаружено 17 позиций, соответствующих 8 физическим коробкам (по номерам). Не применялось раскрытие мультибокса. Обратите внимание, что любая претензия должна быть уведомлена ферме по факсу или электронной почте после получения этой партии. В противном случае никаких корректировок по этому счету не принимается.",
    "status": "warning",
    "sum_boxes": 17,
    "sum_stems": 2725,
    "sum_amount": 2107.5,
    "items_count": 17,
    "discrepancies": [
      "summary.total_stems: Value could not be extracted according to rules (empty cell in source). Expected 2725 (sum of items quantity).",
      "summary.total_boxes: Sum of item boxes (17) does not match expected total boxes (109)."
    ],
    "expected_boxes": 109,
    "expected_stems": null,
    "expected_amount": 2107.5
  }
}
Результат (Pass 2)
Report: warning
items=4, boxes=2/14, stems=350/350, amount=135/135
discrepancies: Discrepancy in total boxes: Calculated 2, Expected 14.
notes: Invoice type: flat. 2 unique box identifiers ('1', 'TOTAL') found in items. No multi-box unfolding applied. Discrepancy between calculated unique item box numbers and summary total boxes.
{
  "awb": "50119717865",
  "items": [
    {
      "boxes": 1,
      "length": "50CM",
      "variety": "CHECK MATE",
      "category": "ROSES",
      "quantity": 175,
      "box_number": "1",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.35,
      "box_marking": "H",
      "total_price": 61.25
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "CHECK MATE",
      "category": "ROSES",
      "quantity": 25,
      "box_number": "1",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.45,
      "box_marking": "H",
      "total_price": 11.25
    },
    {
      "boxes": 1,
      "length": "50CM",
      "variety": "MAMMA MIA",
      "category": "ROSES",
      "quantity": 125,
      "box_number": "1",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.4,
      "box_marking": "H",
      "total_price": 50
    },
    {
      "boxes": 1,
      "length": "50CM",
      "variety": "RED PANTHER",
      "category": "ROSES",
      "quantity": 25,
      "box_number": "TOTAL",
      "plantation": "EL CAMPANARIO DE SANTA ANITA SCC",
      "unit_price": 0.5,
      "box_marking": "H",
      "total_price": 12.5
    }
  ],
  "country": "KIRGUISTAN",
  "summary": {
    "total_boxes": 14,
    "total_stems": 350,
    "total_amount": 135
  },
  "supplier": "EL CAMPANARIO DE SANTA ANITA SCC",
  "invoice_date": "19/02/2026",
  "invoice_number": "055-2026-40-00176632",
  "processing_report": {
    "notes": "Invoice type: flat. 2 unique box identifiers ('1', 'TOTAL') found in items. No multi-box unfolding applied. Discrepancy between calculated unique item box numbers and summary total boxes.",
    "status": "warning",
    "sum_boxes": 2,
    "sum_stems": 350,
    "sum_amount": 135,
    "items_count": 4,
    "discrepancies": [
      "Discrepancy in total boxes: Calculated 2, Expected 14."
    ],
    "expected_boxes": 14,
    "expected_stems": 350,
    "expected_amount": 135
  }
}
История (последние 20)
ID Файл Дата
26 Invoice#0000207143-TDA CVGORODRU-.pdf 2026-02-23 17:10:00.934082+00:00 Excel