File size: 2,544 Bytes
8143f06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "sellerName": {
      "type": "string",
      "description": "seller company name printed in the top-right header (株式会社 ...)"
    },
    "sellerPhone": {
      "type": "string",
      "description": "seller telephone number (TEL) in the top-right header"
    },
    "buyerName": {
      "type": "string",
      "description": "buyer / addressee name shown after 御中 on the left"
    },
    "buyerAddress": {
      "type": "string",
      "description": "buyer address shown after 御住所"
    },
    "branch": {
      "type": "string",
      "description": "issuing branch (支店)"
    },
    "personInCharge": {
      "type": "string",
      "description": "person in charge (担当者)"
    },
    "issueDate": {
      "type": "string",
      "description": "issue date printed top-right in Japanese era format, exactly as shown"
    },
    "lineItems": {
      "type": "array",
      "description": "one entry per product row in the item table",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "productName": {
            "type": "string",
            "description": "product name (商品名), original Japanese"
          },
          "productCode": {
            "type": "string",
            "description": "product code (商品コード) as printed"
          },
          "quantity": {
            "type": "number",
            "description": "quantity (数量)"
          },
          "unitPrice": {
            "type": "number",
            "description": "unit price (単価) in yen"
          },
          "discountPercent": {
            "type": "number",
            "description": "discount percentage (値引き), numeric without percent sign"
          },
          "subtotal": {
            "type": "number",
            "description": "line subtotal (小計) in yen"
          },
          "remark": {
            "type": "string",
            "description": "remark column (適用), e.g. 特別セール割引; empty if none"
          }
        },
        "required": [
          "productName",
          "productCode",
          "quantity",
          "unitPrice",
          "subtotal"
        ]
      }
    },
    "grandTotal": {
      "type": "number",
      "description": "grand total (合計) in yen, number only without 円 or separators"
    }
  },
  "required": [
    "sellerName",
    "buyerName",
    "issueDate",
    "lineItems",
    "grandTotal"
  ]
}