{
  "info": "---- ?? tarkoittaa epäselvää",
  "name": "ah-myohassa_vahvistuspv",
  "query": [
    ["C_POINTER", ["_ptr", "_ptr2"]],
    ["ARRAY_TEXT", ["_atArr", "0"]],
    ["ARRAY_TEXT", ["_atArr2", "0"]],

    ["xapp_TblRun", ["kInit", "por_tbl", "noevent"]],
    ["_txt", "=", ""],
    ["_qry_Fld", ["0", ["por_production_lot", "<>", ["->_txt"]], "", "false"]],
    ["por_HAE_AVOIMET", ["true", "2"]],
    ["_ptr", "=", ["_fld_PtrToFldNumArr", ["por_production_lot", "por_confirmed_arrival_date", "por_record_id"]]],
    ["_ptr2", "=", ["_fld_PtrToFldNumArr2", ["_ptr"]]],
    ["_sel_SEL_TO_ARR", ["_ptr", "_ptr2"]],

    ["xapp_TblRun", ["kInit", "wo_tbl", "noevent"]],
    ["_qry_ARRAY", ["wo_production_lot", "por_asProduction_Lot"]],
    ["_ptr", "=", ["_fld_PtrToFldNumArr", ["wo_production_lot", "wo_sales_order_id", "wo_sales_order_row_id"]]],
    ["_ptr2", "=", ["_fld_PtrToFldArr2", ["_ptr"]]],
    ["_sel_SEL_TO_ARR", ["_ptr", "_ptr2"]],

    ["_qry_ARRAY", ["sor_sales_order_id", "wo_asSales_Order_id"]],
    ["sor_HAE_AVOIMET", ["true"]],
    ["_ptr", "=", ["_fld_PtrToFldNumArr", ["sor_sales_order_id", "sor_row_number", "sor_delivered_date", "sor_record_id"]]],
    ["_ptr2", "=", ["_fld_PtrToFldArr2", ["_ptr"]]],
    ["_sel_SEL_TO_ARR", ["_ptr", "_ptr2"]],

    ["_long2", "=", ["Size_of_array", ["wo_asProduction_Lot"]]],
    ["ARRAY_TEXT", ["_atArr", "_long2"]],
    ["ARRAY_TEXT", ["_atArr2", "_long2"]],
    ["_long5", "=", "0"],
    [
      "For ---- ??", [""],
      [
        [""]
      ]
    ]
  ]
}
