Cp1251
doc
document_title="История поступлений"
document_width=500
document_height=500

postloadscript = "($X
                     ($debug 'ARGUMENTS.0: ' + ARGUMENTS.0 + ' (' + ($ARGUMENTS.0@type) + ')')
                     ($debug 'ARGUMENTS.1: ' + ARGUMENTS.1 + ' (' + ($ARGUMENTS.1@type) + ')')
                     ($debug 'substr 0 10: [' + ($ARGUMENTS.1@substr 0 10) + ']')
                     ($ret '')
                  )"


{ toolbar BACKGROUND=LIGHTGRAY
{grid
buttonbar_font_family = 0     buttonbar_font_size = 12
buttonbar_size = 30           titlebar_size = 18          titlebar_height = 40
rowsize = 20                  editable = no
return = no

{column size=100  
   title="Дата док."   
   target=date_sd  title_font_family=2   halignment=center
   font_color="#000000"    font_size=12            font_family=0
}
{column size=100  
   title="N док."   
   target=num_sd  title_font_family=2   halignment=left
   font_color="#000000"    font_size=12            font_family=0
}
{column size=100  
   title="Цена"   
   target=price1_spc  title_font_family=2   halignment=right
   font_color="#000000"    font_size=12            font_family=0
   editmask = "# #0.00"
}
{column size=100  
   title="Кол-во"   
   target=q1_spc  title_font_family=2   halignment=right
   font_color="#000000"    font_size=12            font_family=0
   editmask = "# #0.000"
}

{datastore 
 alias = ds
 query = "select id_head, num_sd, date_sd, q1_spc, price1_spc
            from (
          select head.id_head, head.num_sd, head.date_sd, 
                 spc.q1_spc, spc.price1_spc
            from head, spc, type_doc
           where spc.id_active = ~($try (ARGUMENTS.0) $catch ('NullException') (-100000) )~
             and spc.id_head = head.id_head
             and head.id_type_doc = type_doc.id_type_doc
             and type_doc.id_sys = 1
             and head.accept = 1
                 )
           order by date_sd desc"
        editable = no
}
}

{button
    left = 72  width = 50    height = 20
    BACKGROUND = "LIGHTGRAY"    foreground="#000000"
    label="Выход ESC"
   action="($self@actCancel)"
   ShortCut = "Escape"
  }
} // toolbar


