{
  "key": "file_80_boxed_payments_ar",
  "name": "80mm Boxed Payments Arabic",
  "size": "80mm",
  "template_json": {
    "version": 1,
    "settings": {
      "size": "80mm",
      "font_family": "Arial, sans-serif",
      "font_style": "normal",
      "custom_css": ""
    },
    "components": [
      {
        "type": "image",
        "label": "Logo",
        "content": {
          "tagSource": "logo",
          "alt": "logo"
        },
        "style": {
          "maxHeight": 65,
          "textAlign": "center"
        },
        "visibility": {
          "tokens": [
            "logo"
          ],
          "groupKey": "logo_boxed"
        }
      },
      {
        "type": "text",
        "label": "Business Name",
        "content": {
          "mode": "tag",
          "tag": "business_name"
        },
        "style": {
          "fontSize": 20,
          "bold": true,
          "textAlign": "center",
          "htmlTag": "h2"
        },
        "layout": {
          "borderStyle": "solid",
          "borderWidth": 1,
          "borderColor": "#000000"
        }
      },
      {
        "type": "text",
        "label": "Location Address",
        "content": {
          "mode": "tag",
          "tag": "address",
          "prefix": "الموقع: "
        },
        "style": {
          "fontSize": 11,
          "textAlign": "center",
          "htmlTag": "p"
        },
        "layout": {
          "borderStyle": "solid",
          "borderWidth": 1,
          "borderColor": "#000000"
        },
        "visibility": {
          "tokens": [
            "address"
          ],
          "groupKey": "branch_address"
        }
      },
      {
        "type": "text",
        "label": "Invoice Number",
        "content": {
          "mode": "tag",
          "tag": "invoice_no",
          "prefix": "رقم الفاتورة: "
        },
        "layout": {
          "width": 55,
          "newLine": true
        },
        "style": {
          "fontSize": 11,
          "bold": true,
          "textAlign": "left",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Invoice Date",
        "content": {
          "mode": "tag",
          "tag": "invoice_date",
          "prefix": "التاريخ: "
        },
        "layout": {
          "width": 45,
          "newLine": false
        },
        "style": {
          "fontSize": 11,
          "textAlign": "right",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Customer Name",
        "content": {
          "mode": "tag",
          "tag": "customer_name",
          "prefix": "اسم العميل: "
        },
        "style": {
          "fontSize": 11,
          "bold": true,
          "textAlign": "left",
          "htmlTag": "p"
        },
        "layout": {
          "borderStyle": "solid",
          "borderWidth": 1,
          "borderColor": "#000000"
        },
        "visibility": {
          "tokens": [
            "customer_name"
          ],
          "groupKey": "customer_box"
        }
      },
      {
        "type": "text",
        "label": "Customer Mobile",
        "content": {
          "mode": "tag",
          "tag": "customer_mobile",
          "prefix": "رقم التلفون: "
        },
        "style": {
          "fontSize": 11,
          "textAlign": "left",
          "htmlTag": "p"
        },
        "layout": {
          "borderStyle": "solid",
          "borderWidth": 1,
          "borderColor": "#000000"
        },
        "visibility": {
          "tokens": [
            "customer_mobile"
          ],
          "groupKey": "customer_box"
        }
      },
      {
        "type": "text",
        "label": "Customer Address",
        "content": {
          "mode": "tag",
          "tag": "customer_address",
          "prefix": "العنوان: "
        },
        "style": {
          "fontSize": 11,
          "textAlign": "left",
          "htmlTag": "p"
        },
        "layout": {
          "borderStyle": "solid",
          "borderWidth": 1,
          "borderColor": "#000000"
        },
        "visibility": {
          "tokens": [
            "customer_address"
          ],
          "groupKey": "customer_box"
        }
      },
      {
        "type": "table",
        "label": "Line Items",
        "content": {
          "tableMode": "line",
          "columns": [
            {
              "header": "المنتجات",
              "width": 42,
              "align": "left",
              "tags": [
                "line.name"
              ],
              "separator": "<br>"
            },
            {
              "header": "الكمية",
              "width": 14,
              "align": "center",
              "tags": [
                "line.quantity"
              ]
            },
            {
              "header": "سعر الوحدة",
              "width": 20,
              "align": "right",
              "tags": [
                "line.unit_price"
              ]
            },
            {
              "header": "المجموع",
              "width": 24,
              "align": "right",
              "tags": [
                "line.line_total"
              ]
            }
          ]
        },
        "style": {
          "headerFontSize": 10,
          "bodyFontSize": 10,
          "headerBold": true,
          "borderStyle": "solid",
          "borderWidth": 1,
          "borderColor": "#000000"
        }
      },
      {
        "type": "divider",
        "label": "Payment Divider",
        "style": {
          "lineStyle": "solid",
          "lineThickness": 2
        }
      },
      {
        "type": "text",
        "label": "Total Label",
        "content": {
          "mode": "static",
          "staticText": "المجموع"
        },
        "layout": {
          "width": 42,
          "newLine": true
        },
        "style": {
          "fontSize": 14,
          "bold": true,
          "textAlign": "left",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Total Value",
        "content": {
          "mode": "tag",
          "tag": "total"
        },
        "layout": {
          "width": 58,
          "newLine": false
        },
        "style": {
          "fontSize": 14,
          "bold": true,
          "textAlign": "right",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Paid Label",
        "content": {
          "mode": "static",
          "staticText": "المدفوع"
        },
        "layout": {
          "width": 42,
          "newLine": true
        },
        "style": {
          "fontSize": 12,
          "textAlign": "left",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Paid Value",
        "content": {
          "mode": "tag",
          "tag": "total_paid"
        },
        "layout": {
          "width": 58,
          "newLine": false
        },
        "style": {
          "fontSize": 12,
          "textAlign": "right",
          "htmlTag": "p"
        }
      },
      {
        "type": "text",
        "label": "Cash Label",
        "content": {
          "mode": "static",
          "staticText": "نقدي"
        },
        "layout": {
          "width": 42,
          "newLine": true
        },
        "style": {
          "fontSize": 12,
          "textAlign": "left",
          "htmlTag": "p"
        },
        "visibility": {
          "tokens": [
            "payment_cash"
          ],
          "groupKey": "cash_row_boxed"
        }
      },
      {
        "type": "text",
        "label": "Cash Value",
        "content": {
          "mode": "tag",
          "tag": "payment_cash"
        },
        "layout": {
          "width": 58,
          "newLine": false
        },
        "style": {
          "fontSize": 12,
          "textAlign": "right",
          "htmlTag": "p"
        },
        "visibility": {
          "tokens": [
            "payment_cash"
          ],
          "groupKey": "cash_row_boxed"
        }
      },
      {
        "type": "text",
        "label": "KNET Label",
        "content": {
          "mode": "static",
          "staticText": "كي نت"
        },
        "layout": {
          "width": 42,
          "newLine": true
        },
        "style": {
          "fontSize": 12,
          "textAlign": "left",
          "htmlTag": "p"
        },
        "visibility": {
          "tokens": [
            "payment_knet"
          ],
          "groupKey": "knet_row_boxed"
        }
      },
      {
        "type": "text",
        "label": "KNET Value",
        "content": {
          "mode": "tag",
          "tag": "payment_knet"
        },
        "layout": {
          "width": 58,
          "newLine": false
        },
        "style": {
          "fontSize": 12,
          "textAlign": "right",
          "htmlTag": "p"
        },
        "visibility": {
          "tokens": [
            "payment_knet"
          ],
          "groupKey": "knet_row_boxed"
        }
      }
    ]
  }
}
