{
  "version": 1,
  "name": "Data guide: open order lines",
  "page": {
    "size": "Letter",
    "width": 612,
    "height": 792,
    "orientation": "portrait",
    "margins": {
      "top": 30,
      "right": 36,
      "bottom": 26,
      "left": 36
    }
  },
  "locale": "en-US",
  "defaultStyle": {
    "fontFamily": "Arimo",
    "fontSize": 8.5,
    "color": "#111827",
    "lineHeight": 1.2
  },
  "styles": {
    "title": {
      "fontSize": 18,
      "bold": true,
      "color": "#0f4c81",
      "align": "right",
      "letterSpacing": 0.3
    },
    "subtitle": {
      "fontSize": 8,
      "color": "#4b5563",
      "align": "right"
    },
    "company": {
      "fontSize": 11,
      "bold": true,
      "color": "#111827"
    },
    "companyAddr": {
      "fontSize": 7.5,
      "color": "#4b5563",
      "lineHeight": 1.3
    },
    "section": {
      "fontSize": 7.5,
      "bold": true,
      "color": "#ffffff",
      "background": "#0f4c81",
      "vAlign": "middle",
      "padding": {
        "top": 0,
        "right": 6,
        "bottom": 0,
        "left": 6
      },
      "letterSpacing": 0.4,
      "textTransform": "uppercase"
    },
    "label": {
      "fontSize": 6.5,
      "bold": true,
      "color": "#4b5563",
      "textTransform": "uppercase",
      "letterSpacing": 0.3
    },
    "value": {
      "fontSize": 9,
      "color": "#111827"
    },
    "valueStrong": {
      "fontSize": 10,
      "bold": true,
      "color": "#111827"
    },
    "body": {
      "fontSize": 8.5,
      "color": "#111827",
      "lineHeight": 1.3
    },
    "muted": {
      "fontSize": 7,
      "color": "#4b5563",
      "lineHeight": 1.3
    },
    "fine": {
      "fontSize": 6.5,
      "color": "#4b5563",
      "lineHeight": 1.3
    },
    "totalLabel": {
      "fontSize": 8.5,
      "color": "#4b5563",
      "align": "right",
      "vAlign": "middle",
      "padding": {
        "top": 0,
        "right": 6,
        "bottom": 0,
        "left": 6
      }
    },
    "totalValue": {
      "fontSize": 9,
      "color": "#111827",
      "align": "right",
      "vAlign": "middle",
      "padding": {
        "top": 0,
        "right": 6,
        "bottom": 0,
        "left": 6
      }
    },
    "grandLabel": {
      "fontSize": 10,
      "bold": true,
      "color": "#ffffff",
      "background": "#0f4c81",
      "align": "right",
      "vAlign": "middle",
      "padding": {
        "top": 0,
        "right": 6,
        "bottom": 0,
        "left": 6
      }
    },
    "grandValue": {
      "fontSize": 10,
      "bold": true,
      "color": "#ffffff",
      "background": "#0f4c81",
      "align": "right",
      "vAlign": "middle",
      "padding": {
        "top": 0,
        "right": 6,
        "bottom": 0,
        "left": 6
      }
    }
  },
  "fonts": [],
  "metadata": {
    "title": "Open order lines",
    "author": "{{ company.name }}"
  },
  "bands": {
    "pageHeader": {
      "enabled": true,
      "height": 40,
      "printOn": "all",
      "elements": [
        {
          "id": "txt1",
          "type": "text",
          "x": 0,
          "y": 0,
          "width": 300,
          "height": 20,
          "text": "Open order lines",
          "styleRef": "title",
          "style": {
            "align": "left"
          }
        },
        {
          "id": "txt2",
          "type": "text",
          "x": 340,
          "y": 4,
          "width": 200,
          "height": 12,
          "text": "Report date {{ formatDate(reportDate, 'MM/DD/YYYY') }}",
          "styleRef": "subtitle",
          "style": {
            "fontSize": 9
          }
        },
        {
          "id": "ln1",
          "type": "line",
          "x": 0,
          "y": 34,
          "width": 540,
          "height": 0,
          "stroke": {
            "width": 1.5,
            "color": "#0f4c81"
          }
        }
      ]
    },
    "body": {
      "height": 60,
      "elements": [
        {
          "id": "tbl1",
          "type": "table",
          "x": 0,
          "y": 0,
          "width": 540,
          "height": 50,
          "name": "Order lines",
          "dataPath": "lines",
          "columns": [
            {
              "id": "col1",
              "header": "SKU",
              "value": "{{ item.sku }}",
              "width": 102
            },
            {
              "id": "col2",
              "header": "Description",
              "value": "{{ item.description }}",
              "width": 250
            },
            {
              "id": "col3",
              "header": "Ordered",
              "value": "{{ item.qty }}",
              "width": 63,
              "groupFooter": "{{ sum(rows, 'qty') }}",
              "headerStyle": {
                "align": "right"
              },
              "footerStyle": {
                "align": "right"
              },
              "cellStyle": {
                "align": "right"
              }
            },
            {
              "id": "col4",
              "header": "Shipped",
              "value": "{{ item.shipped }}",
              "width": 63,
              "groupFooter": "{{ sum(rows, 'shipped') }}",
              "headerStyle": {
                "align": "right"
              },
              "footerStyle": {
                "align": "right"
              },
              "cellStyle": {
                "align": "right"
              }
            },
            {
              "id": "col5",
              "header": "Open",
              "value": "{{ item.qty - item.shipped }}",
              "width": 62,
              "headerStyle": {
                "align": "right"
              },
              "footerStyle": {
                "align": "right"
              },
              "cellStyle": {
                "align": "right"
              }
            }
          ],
          "showHeader": true,
          "repeatHeader": true,
          "headerHeight": 18,
          "rowHeight": 16,
          "headerStyle": {
            "fontSize": 7,
            "bold": true,
            "color": "#ffffff",
            "background": "#0f4c81",
            "vAlign": "middle",
            "padding": {
              "top": 2,
              "right": 4,
              "bottom": 2,
              "left": 4
            },
            "textTransform": "uppercase"
          },
          "cellStyle": {
            "fontSize": 8,
            "color": "#111827",
            "vAlign": "middle",
            "padding": {
              "top": 2,
              "right": 4,
              "bottom": 2,
              "left": 4
            }
          },
          "footerStyle": {
            "fontSize": 8,
            "bold": true,
            "color": "#111827",
            "background": "#dbe7f3",
            "vAlign": "middle",
            "padding": {
              "top": 2,
              "right": 4,
              "bottom": 2,
              "left": 4
            }
          },
          "altRowBackground": "#f5f8fb",
          "gridStroke": {
            "width": 0.5,
            "color": "#cbd5e1"
          },
          "groupBy": "item.orderNumber",
          "groupHeader": "Order {{ group.key }} · {{ item.customer }} · ordered {{ formatDate(item.orderDate, 'MM/DD/YYYY') }}",
          "groupHeaderHeight": 18,
          "groupHeaderStyle": {
            "fontSize": 8.5,
            "bold": true,
            "color": "#0f4c81",
            "background": "#dbe7f3",
            "vAlign": "middle",
            "padding": {
              "top": 2,
              "right": 6,
              "bottom": 2,
              "left": 6
            }
          },
          "showGroupFooter": true,
          "groupFooterHeight": 16,
          "groupFooterStyle": {
            "fontSize": 8,
            "bold": true,
            "color": "#111827",
            "background": "#eef2f7",
            "vAlign": "middle",
            "padding": {
              "top": 2,
              "right": 4,
              "bottom": 2,
              "left": 4
            }
          },
          "repeatGroupHeader": true
        }
      ]
    },
    "pageFooter": {
      "enabled": true,
      "height": 28,
      "printOn": "all",
      "elements": [
        {
          "id": "ln2",
          "type": "line",
          "x": 0,
          "y": 4,
          "width": 540,
          "height": 0,
          "stroke": {
            "width": 0.5,
            "color": "#9ca3af"
          }
        },
        {
          "id": "txt3",
          "type": "text",
          "x": 0,
          "y": 8,
          "width": 324,
          "height": 19,
          "text": "Open order lines",
          "styleRef": "fine"
        },
        {
          "id": "txt4",
          "type": "text",
          "x": 324,
          "y": 8,
          "width": 216,
          "height": 19,
          "text": "Page {{page}} of {{pages}}\nPrinted {{ formatDate(now, 'MM/DD/YYYY h:mm A') }}",
          "styleRef": "fine",
          "style": {
            "align": "right"
          }
        }
      ]
    }
  }
}
