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

Intent ID: 29

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (Invoice#0000208652-TDA CVGORODRU-.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": "14599817594",
  "items": [
    {
      "boxes": 1,
      "length": "50CM",
      "variety": "CHECK MATE",
      "category": "ROSES",
      "quantity": 125,
      "box_number": "1",
      "plantation": "EC BLOOMS S.A.S.",
      "unit_price": 0.35,
      "box_marking": "H",
      "total_price": 43.75
    },
    {
      "boxes": 1,
      "length": "60CM",
      "variety": "CHECK MATE",
      "category": "ROSES",
      "quantity": 150,
      "box_number": "1",
      "plantation": "EC BLOOMS S.A.S.",
      "unit_price": 0.45,
      "box_marking": "H",
      "total_price": 67.5
    },
    {
      "boxes": 1,
      "length": "50CM",
      "variety": "RED PANTHER",
      "category": "ROSES",
      "quantity": 75,
      "box_number": "TOTAL",
      "plantation": "EC BLOOMS S.A.S.",
      "unit_price": 0.5,
      "box_marking": "H",
      "total_price": 37.5
    }
  ],
  "country": "KIRGUISTAN",
  "summary": {
    "total_boxes": 14,
    "total_stems": 350,
    "total_amount": 148.75
  },
  "supplier": "EC BLOOMS S.A.S.",
  "invoice_date": "26/02/2026",
  "invoice_number": "055-2026-40-00339502",
  "processing_report": {
    "notes": "Invoice type: Flat. Each table row describes a separate item/box. No 'MIXED BOX' or groupings. Detected 3 item lines. The summary states 14 total boxes, which implies that the 3 item lines might represent types of boxes, not individual physical boxes, conflicting with the flat invoice rule. A box number 'TOTAL' was found for an item, which is unusual. No multi-box unfolding was applied as per rules. Notice: Please, be aware that any claim must be notified to the farm by fax or e-mail upon receipt of this shipment. Otherwise, no adjustment will be accepted to this invoice.",
    "status": "warning",
    "sum_boxes": 3,
    "sum_stems": 350,
    "sum_amount": 148.75,
    "items_count": 3,
    "discrepancies": [
      "Box number 'TOTAL' found for an item. Expected a numeric box identifier.",
      "Total boxes mismatch: Sum of item boxes (3) does not match summary total (14)."
    ],
    "expected_boxes": 14,
    "expected_stems": 350,
    "expected_amount": 148.75
  }
}
Результат (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