<?xml version="1.0" encoding="utf-8" standalone="no"?>
<TfrxReport Version="6.5.7" DotMatrixReport="False" EngineOptions.SilentMode="True" EngineOptions.NewSilentMode="simSilent" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="43053.6074453472" ReportOptions.Description.Text="" ReportOptions.LastChange="43399.4341964815" ScriptLanguage="PascalScript" ScriptText.Text="var&#13;&#10;  STOCK , m0,y0,m_1,ym0,ym1: string ;&#13;&#10;    Line_no: integer ;&#13;&#10;procedure DialogPage1OnActivate(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;//  date1.Date := now ;&#13;&#10;//  date2.Date := now ;&#13;&#10;&#13;&#10;  qry_STOCK.Close ;&#13;&#10;  qry_STOCK.Open  ;&#13;&#10;&#13;&#10;  m1.Text:=COPY( DATEtoYMD(&#60;Date&#62;),5,2) ;&#13;&#10;  y1.Text:=COPY( DATEtoYMD(&#60;Date&#62;),1,4) ;&#13;&#10;&#13;&#10;end;&#13;&#10;&#13;&#10;procedure chk_allOnClick(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;  if chk_all.checked then&#13;&#10;  begin&#13;&#10;   cbb_STOCK.KeyValue  := '%' ;&#13;&#10;   STOCK :=  cbb_STOCK.KeyValue    ;&#13;&#10;   cbb_STOCK.Enabled := false ;&#13;&#10;   Memo17.Text  := 'รวมทุกคลัง'&#13;&#10;  end&#13;&#10;  else&#13;&#10;  begin&#13;&#10;   STOCK := cbb_STOCK.KeyValue  ;&#13;&#10;   cbb_STOCK.Enabled := true ;&#13;&#10;   Memo17.Text  :=   cbb_STOCK.Text   ;&#13;&#10;  end;&#13;&#10;end;&#13;&#10;&#13;&#10;procedure bt_okOnClick(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;  if chk_all.checked then&#13;&#10;  begin&#13;&#10;   cbb_STOCK.KeyValue  := '%' ;&#13;&#10;   STOCK :=  cbb_STOCK.KeyValue    ;&#13;&#10;   cbb_STOCK.Enabled := false ;&#13;&#10;   Memo17.Text  :=  'คลัง   รวมทุกคลัง'&#13;&#10;  end&#13;&#10;  else&#13;&#10;  begin&#13;&#10;   STOCK := cbb_STOCK.KeyValue  ;&#13;&#10;   cbb_STOCK.Enabled := true ;&#13;&#10;   Memo17.Text  := 'คลัง:' + ' ' +   cbb_STOCK.Text   ;&#13;&#10;  end;&#13;&#10;//   Memo21.Text :=  ThaiDay(date1.date,false)   ;&#13;&#10;//   Memo22.Text :=  ThaiDay(date2.date,false)   ;&#13;&#10;&#13;&#10;     Memo22.Text :=   MonthThai( strtoint(m1.Text) ,true) + '  '  +  y1.Text   ;&#13;&#10;&#13;&#10;  if   inttostr(strtoint(m1.text)) = '1' then&#13;&#10;  begin            //  256001    m0 = 12&#13;&#10;     m0:= '12' ;&#13;&#10;     y0:=inttostr(strtoint(y1.text)-1-543) ;        //   2560 - 1 - 543  =  2016&#13;&#10;     m_1 := '01' ;            //    m1 = 01&#13;&#10;  end&#13;&#10;  else&#13;&#10;  begin&#13;&#10;    if   length(inttostr(strtoint(m1.text)-1)) = 1 then      //  01  &#62;&#62; 1&#13;&#10;    begin&#13;&#10;      m0:= '0'+inttostr(strtoint(m1.text)-1);   //  &#62;&#62;&#62; 01&#13;&#10;      if   length(inttostr(strtoint(m1.text))) = 1  //   1&#13;&#10;      then  m_1:= '0'+inttostr(strtoint(m1.text))   //  01&#13;&#10;      else m_1:= m1.text;        // 01&#13;&#10;    end&#13;&#10;    else&#13;&#10;    begin&#13;&#10;      m0:= inttostr(strtoint(m1.text)-1) ;     //   01&#13;&#10;      m_1:= m1.text;                             // 01&#13;&#10;    end;&#13;&#10;    y0:=inttostr(strtoint(y1.text)-543) ;      //  2560 - 543 = 2016&#13;&#10;  end;&#13;&#10;&#13;&#10;  ym0:= y0 + m0 ;&#13;&#10;  ym1:=inttostr(strtoint(y1.text)-543)+m_1 ;&#13;&#10;&#13;&#10;   //     :ym_fw = ym0&#13;&#10;  //      :ym1   = ym1&#13;&#10;   //     :dept0   = 'STOCK1'&#13;&#10;  //      :ym2  = ym1&#13;&#10; //       :dept   = 'STOCK1'&#13;&#10;end;&#13;&#10;&#13;&#10;begin&#13;&#10;&#13;&#10;end.">
  <Datasets>
    <item DataSet="qry_remain1" DataSetName="qry_remain1"/>
    <item DataSet="qry_STOCK" DataSetName="qry_STOCK"/>
    <item DataSet="UniDACQuery1" DataSetName="UniDACQuery1"/>
  </Datasets>
  <TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000">
    <TfrxUniDACQuery Name="qry_remain1" UserName="qry_remain1" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" IgnoreDupParams="False" SQL.Text="-- SELECT    -- T.WORKING_CODE ,   SUM(FW_VALUE) as FW_VALUE,SUM(RCV_VALUE) as RCV_VALUE,SUM(DIS_VALUE) as DIS_VALUE,SUM(RM_VALUE) as RM_VALUE from (  &#13;&#10;select i.WORKING_CODE,dbo.IS_ED(g.IS_ED) as NLEM, g.DRUG_NAME  ,&#13;&#10;&#13;&#10;(  select top 1 c.REMAIN_VALUE from  CARD c  &#13;&#10;        where &#13;&#10;        left(c.R_S_DATE,6) between  left(dbo.ce2cymd(GETDATE()-900),6) and   :ym_fw                       &#13;&#10;        and c.WORKING_CODE=i.WORKING_CODE  and  c.REMAIN_VALUE &#62;=0                                    &#13;&#10;        and c.STOCK_ID=i.DEPT_ID order by c.OPERATE_DATE DESC )  as FW_VALUE&#13;&#10;,  Cx.RCV_VALUE,Cx.DIS_VALUE ,&#13;&#10;      &#13;&#10;isnull((select top 1 c.REMAIN_VALUE from  CARD c  &#13;&#10;        where &#13;&#10;        left(c.R_S_DATE,6)  between  left(dbo.ce2cymd(GETDATE()-900),6)   and   :ym1                &#13;&#10;        and c.WORKING_CODE=i.WORKING_CODE   and  c.REMAIN_VALUE &#62;=0           &#13;&#10;        and c.STOCK_ID=i.DEPT_ID order by c.OPERATE_DATE DESC ),0) as REMAIN_VALUE  &#13;&#10;&#13;&#10;,&#13;&#10;      &#13;&#10;isnull((select top 1 ( c.REMAIN_QTY / (select top 1 z.PACK_RATIO  from PACK_RATIO  z where z.WORKING_CODE = Cx.WORKING_CODE order by  z.LAST_BUY DESC)  ) from  CARD c  &#13;&#10;        where &#13;&#10;        left(c.R_S_DATE,6)  between  left(dbo.ce2cymd(GETDATE()-900),6)   and   :ym1                &#13;&#10;        and c.WORKING_CODE=i.WORKING_CODE   and  c.REMAIN_VALUE &#62;=0           &#13;&#10;        and c.STOCK_ID=i.DEPT_ID order by c.OPERATE_DATE DESC ),0) as REMAIN_QTY  &#13;&#10;&#13;&#10;, isnull((select top 1 z.PACK_RATIO  from PACK_RATIO  z where z.WORKING_CODE = Cx.WORKING_CODE order by  z.LAST_BUY DESC),0) as 'PACK_RATIO'&#13;&#10;,u.SALE_UNIT,h.HOSP_LIST_DESC,dbo.IS_ED(g.IS_ED) as IS_ED   , d.DEPT_NAME   &#13;&#10;     &#13;&#10;    ,i.TOTAL_VALUE&#13;&#10;          &#13;&#10;from INV_MD i&#13;&#10;left join DRUG_GN g on (i.WORKING_CODE=g.WORKING_CODE)&#13;&#10;left join SALE_UNIT u (NOLOCK) on (g.SALE_UNIT_ID=u.SU_ID)&#13;&#10;left join ED_GROUP e (NOLOCK) on (g.GROUP_CODE=e.CODE)&#13;&#10;left join SUB_COM s (NOLOCK) on (g.SUBCOM=s.SUB_COMMIT_CODE)&#13;&#10;left join HOSP_LIST h (NOLOCK) on (g.HOSP_LIST=h.HOSP_LIST_CODE) &#13;&#10;left join  (&#13;&#10;   select c1.WORKING_CODE,c1.STOCK_ID,&#13;&#10;          						SUM(CASE when c1.R_S_STATUS in ('R','I','G','A') then c1.[VALUE]&#13;&#10;                   when c1.R_S_STATUS in ('B') then c1.[VALUE]*-1    &#13;&#10;                   else NULL end) as RCV_VALUE,&#13;&#10;            						SUM(CASE when c1.R_S_STATUS in ('T','S')  then c1.[VALUE] &#13;&#10;	                     									 when (c1.R_S_STATUS='C') then c1.[VALUE]*-1 else NULL end) as DIS_VALUE&#13;&#10;            						from CARD c1&#13;&#10;            where c1.STOCK_ID like :dept0     &#13;&#10;            and left(c1.R_S_DATE,6) =  :ym2&#13;&#10;            group by c1.WORKING_CODE,c1.STOCK_ID ) as Cx on (Cx.WORKING_CODE = i.WORKING_CODE  and Cx.STOCK_ID=i.DEPT_ID)&#13;&#10;left join DEPT_ID d (NOLOCK) on (Cx.STOCK_ID=d.DEPT_ID)                  &#13;&#10;where i.DEPT_ID like :dept  and   g.WORKING_CODE is not null  and g.HIDE &#60;&#62; 'Y'         &#13;&#10;order by  d.DEPT_NAME    &#13;&#10;--      )  as T&#13;&#10;/*where T.TOTAL_VALUE  &#62; 0.99 */&#13;&#10;/*where   FW_VALUE &#62; 0 and   RCV_VALUE &#62; 0 and   DIS_VALUE &#62; 0 and   RM_VALUE &#62; 0   */   &#13;&#10;-- GROUP BY T.WORKING_CODE&#13;&#10;-- ORDER BY T.WORKING_CODE        " SpecificOptions.Text="" PropData="05704C65667403E5000470546F7002480A506172616D657465727301010632204E616D653D22796D5F6677222044617461547970653D226674537472696E67222045787072657373696F6E3D22796D302200010630204E616D653D22796D31222044617461547970653D226674537472696E67222045787072657373696F6E3D22796D312200010630204E616D653D22796D31222044617461547970653D226674537472696E67222045787072657373696F6E3D22796D31220001064D204E616D653D226465707430222044617461547970653D226674537472696E67222045787072657373696F6E3D22272527202B206362625F53544F434B2E6B657976616C7565202B202725272200010630204E616D653D22796D32222044617461547970653D226674537472696E67222045787072657373696F6E3D22796D31220001064C204E616D653D2264657074222044617461547970653D226674537472696E67222045787072657373696F6E3D22272527202B206362625F53544F434B2E6B657976616C7565202B20272527220000"/>
    <TfrxUniDACQuery Name="qry_STOCK" UserName="qry_STOCK" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" IgnoreDupParams="False" SQL.Text="select * from DEPT_ID (NOLOCK) where (HIDE='' or HIDE is null or HIDE='N')     &#13;&#10;and DEPT_TYPE IN ('2','3')     " SpecificOptions.Text="" PropData="05704C65667403E3000470546F7003C2000A506172616D65746572730100"/>
    <TfrxUniDACQuery Name="UniDACQuery1" UserName="UniDACQuery1" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" IgnoreDupParams="False" SQL.Text="select  g.WORKING_CODE,g.DRUG_NAME,&#13;&#10;(select top 1 z.PACK_RATIO  from PACK_RATIO  z where z.WORKING_CODE=c.WORKING_CODE order by  z.LAST_BUY DESC) as PACK_RATIO,u.SALE_UNIT,  &#13;&#10;                                                                                     &#13;&#10; ( select top 1 cd.REMAIN_QTY / (select top 1 z.PACK_RATIO  from PACK_RATIO  z where z.WORKING_CODE=c.WORKING_CODE order by  z.LAST_BUY DESC)   from CARD cd where cd.WORKING_CODE = c.WORKING_CODE   &#13;&#10;and cd.R_S_DATE &#60; :date3  and cd.STOCK_ID = c.STOCK_ID &#13;&#10;ORDER BY cd.OPERATE_DATE DESC ) as 'REMAIN_QTY'  , &#13;&#10;&#13;&#10;( select top 1 cd.REMAIN_VALUE    from CARD cd where cd.WORKING_CODE = c.WORKING_CODE   &#13;&#10;and cd.R_S_DATE &#60; :date4  and cd.STOCK_ID = c.STOCK_ID&#13;&#10;ORDER BY cd.OPERATE_DATE DESC ) as 'REMAIN_VALUE' ,&#13;&#10;h.HOSP_LIST_DESC,dbo.IS_ED(g.IS_ED) as IS_ED ,&#13;&#10;case when (select top 1 i.STD_PRICE from INV_MD i (NOLOCK) where i.WORKING_CODE=c.WORKING_CODE and i.DEPT_ID=c.STOCK_ID) is null then&#13;&#10;(select top 1 z.BUY_UNIT_COST  from PACK_RATIO  z where z.WORKING_CODE=c.WORKING_CODE order by  z.LAST_BUY DESC) else&#13;&#10;(select top 1 i.STD_PRICE from INV_MD i (NOLOCK) where i.WORKING_CODE=c.WORKING_CODE and i.DEPT_ID=c.STOCK_ID) end as U_PRICE,&#13;&#10;g.GROUP_CODE,e.NAME as ED_NAME,s.SUB_COMMIT_DES,dbo.ED_LIST(g.ED_LIST) as ED_LIST, CASE when v.TRADE_FLAG=0 then 'Original' else ' Generic' end as 'O/G',&#13;&#10;dbo.FiscalYear(c.R_S_DATE)  as 'FiscalYear'   , d.DEPT_NAME   &#13;&#10;from CARD c (NOLOCK)&#13;&#10;left join DRUG_VN v (NOLOCK) on (c.TRADE_CODE=v.TRADE_CODE)&#13;&#10;left join DRUG_GN g (NOLOCK) on (c.WORKING_CODE=g.WORKING_CODE)&#13;&#10;left join SALE_UNIT u (NOLOCK) on (g.SALE_UNIT_ID=u.SU_ID)                                                                                                                                     &#13;&#10;left join ED_GROUP e (NOLOCK) on (g.GROUP_CODE=e.CODE)&#13;&#10;left join SUB_COM s (NOLOCK) on (g.SUBCOM=s.SUB_COMMIT_CODE)&#13;&#10;left join HOSP_LIST h (NOLOCK) on (g.HOSP_LIST=h.HOSP_LIST_CODE)      &#13;&#10;left join INV_MD i (NOLOCK) on (c.WORKING_CODE=i.WORKING_CODE and i.DEPT_ID=c.STOCK_ID)&#13;&#10;left join DEPT_ID d (NOLOCK) on (c.STOCK_ID=d.DEPT_ID)                                                                                                                    &#13;&#10;where  d.DEPT_TYPE IN ('2','3')     and &#13;&#10;left(c.R_S_DATE,6) =:date2  &#13;&#10;AND  c.STOCK_ID LIKE :STOCK_ID                                                           &#13;&#10;group by g.DRUG_NAME,s.SUB_COMMIT_DES,e.NAME,h.HOSP_LIST_DESC,u.SALE_UNIT,c.WORKING_CODE,dbo.IS_ED(g.IS_ED),g.GROUP_CODE ,dbo.ED_LIST(g.ED_LIST) ,&#13;&#10;CASE when v.TRADE_FLAG=0 then 'Original' else ' Generic' end,g.WORKING_CODE ,dbo.FiscalYear(c.R_S_DATE),c.STOCK_ID   , d.DEPT_NAME           &#13;&#10;order by  d.DEPT_NAME  ,g.DRUG_NAME&#13;&#10;  " SpecificOptions.Text="" PropData="05704C65667402620470546F700390000A506172616D657465727301010654204E616D653D226461746533222044617461547970653D226674537472696E67222045787072657373696F6E3D22466F726D61744461746554696D652827595959596D6D6464272C64617465322E64617465292200010654204E616D653D226461746534222044617461547970653D226674537472696E67222045787072657373696F6E3D22466F726D61744461746554696D652827595959596D6D6464272C64617465322E6461746529220001065E204E616D653D226461746532222044617461547970653D226674537472696E67222045787072657373696F6E3D22436F707928466F726D61744461746554696D652827595959596D6D6464272C64617465322E64617465292C312C36292200010651204E616D653D2253544F434B5F4944222044617461547970653D226674537472696E67222045787072657373696F6E3D2220272527202B206362625F53544F434B2E6B657976616C7565202B20272527220000"/>
  </TfrxDataPage>
  <TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" Frame.Typ="0" MirrorMode="0" HGuides.Text="" VGuides.Text="">
    <TfrxReportTitle Name="ReportTitle1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="120.10235" Left="0" Top="18.89765" Width="718.1107">
      <TfrxMemoView Name="Memo1" AllowVectorExport="True" Left="1" Top="2.10235" Width="716.51979" Height="39.89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-35" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="รายงานยอดคงเหลือ ณ ช่วงเวลา"/>
      <TfrxMemoView Name="Memo3" AllowVectorExport="True" Left="267" Top="51.10235" Width="43.76345" Height="32.33859" Font.Charset="1" Font.Color="-16777208" Font.Height="-27" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="วันที่"/>
      <TfrxMemoView Name="Memo4" AllowVectorExport="True" Left="2" Top="93.10235" Width="77.77922" Height="24.77953" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="รหัสยา"/>
      <TfrxMemoView Name="Memo5" AllowVectorExport="True" Left="82" Top="92.85235" Width="206.28324" Height="24.77953" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="ชื่อยา"/>
      <TfrxMemoView Name="Memo6" AllowVectorExport="True" Left="287.25" Top="93.35235" Width="96.67687" Height="24.77953" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="ขนาดบรรจุ"/>
      <TfrxMemoView Name="Memo7" AllowVectorExport="True" Left="386.5" Top="92.35235" Width="96.67687" Height="24.77953" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="หน่วย"/>
      <TfrxMemoView Name="Memo8" AllowVectorExport="True" Left="483.09090909" Top="93.01144091" Width="77.77922" Height="24.77953" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="ยอดคงเหลือ"/>
      <TfrxMemoView Name="Memo9" AllowVectorExport="True" Left="564.25" Top="93.10235" Width="77.77922" Height="24.77953" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="มูลค่ารวม"/>
      <TfrxMemoView Name="Memo10" AllowVectorExport="True" Left="654.75" Top="94.10235" Width="51.32251" Height="21" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="บัญชี รพ."/>
      <TfrxMemoView Name="Memo22" AllowVectorExport="True" Left="320.63636364" Top="51.10235" Width="149.59029" Height="32.33859" Font.Charset="1" Font.Color="-16777208" Font.Height="-27" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" ParentFont="False" Text=""/>
      <TfrxLineView Name="Line1" AllowVectorExport="True" Left="-0.09090909" Top="120.10235" Width="717.98886909" Height="0" Color="0" Frame.Typ="0" Diagonal="True"/>
    </TfrxReportTitle>
    <TfrxReportSummary Name="ReportSummary1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="0" Left="0" Top="385.51206" Width="718.1107"/>
    <TfrxMasterData Name="MasterData1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="24.31354364" Left="0" Top="245.66945" Width="718.1107" ColumnWidth="0" ColumnGap="0" DataSet="qry_remain1" DataSetName="qry_remain1" RowCount="0" Stretched="True">
      <TfrxMemoView Name="Memo11" AllowVectorExport="True" Left="2.63636364" Top="0.97124273" Width="77.77922" Height="21" StretchMode="smActualHeight" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[Trim(&#60;qry_remain1.&#34;WORKING_CODE&#34;&#62;)]"/>
      <TfrxMemoView Name="Memo12" AllowVectorExport="True" Left="82.54545455" Top="0.97124273" Width="199.31106909" Height="21" StretchMode="smActualHeight" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[Trim(&#60;qry_remain1.&#34;DRUG_NAME&#34;&#62;)]"/>
      <TfrxMemoView Name="Memo13" AllowVectorExport="True" Left="284.81818182" Top="0.82807636" Width="97.26375909" Height="21" StretchMode="smActualHeight" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[Trim(&#60;qry_remain1.&#34;PACK_RATIO&#34;&#62;)]"/>
      <TfrxMemoView Name="Memo14" AllowVectorExport="True" Left="384.81818182" Top="0.64625818" Width="97.26375909" Height="21" StretchMode="smActualHeight" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[Trim(&#60;qry_remain1.&#34;SALE_UNIT&#34;&#62;)]"/>
      <TfrxMemoView Name="Memo15" AllowVectorExport="True" Left="483.81818182" Top="1.73716727" Width="78.36610909" Height="21" StretchMode="smActualHeight" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[Trim(&#60;qry_remain1.&#34;REMAIN_QTY&#34;&#62;)]"/>
      <TfrxMemoView Name="Memo16" AllowVectorExport="True" Left="565.18181818" Top="2.64625818" Width="78.36610909" Height="21" StretchMode="smActualHeight" DisplayFormat.FormatStr="%2.2f" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[Trim(&#60;qry_remain1.&#34;REMAIN_VALUE&#34;&#62;)]"/>
      <TfrxMemoView Name="Memo20" AllowVectorExport="True" Left="645.36363636" Top="2.83735273" Width="70.80704909" Height="21" StretchMode="smActualHeight" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[Trim(&#60;qry_remain1.&#34;HOSP_LIST_DESC&#34;&#62;)]"/>
    </TfrxMasterData>
    <TfrxGroupHeader Name="GroupHeader1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="21.73716727" Left="0" Top="200.31509" Width="718.1107" Condition="qry_remain1.&#34;DEPT_NAME&#34;" StartNewPage="True">
      <TfrxMemoView Name="Memo17" AllowVectorExport="True" Left="6.72727273" Top="0.73716727" Width="316.35466818" Height="21" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="TH SarabunPSK" Font.Style="5" Frame.Typ="0" ParentFont="False" Text="คลัง : [Trim(&#60;qry_remain1.&#34;DEPT_NAME&#34;&#62;)]"/>
    </TfrxGroupHeader>
    <TfrxGroupFooter Name="GroupFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="35.62615909" Left="0" Top="291.02381" Width="718.1107">
      <TfrxMemoView Name="Memo18" AllowVectorExport="True" Left="409.90909091" Top="10.84662909" Width="73.99969" Height="24.77953" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="TH SarabunPSK" Font.Style="4" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="มูลค่ารวม"/>
      <TfrxMemoView Name="Memo19" AllowVectorExport="True" Left="493.45454545" Top="10.75572" Width="221.39764909" Height="24.77953" StretchMode="smActualHeight" DisplayFormat.FormatStr="%2.2n" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="TH SarabunPSK" Font.Style="4" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[SUM(&#60;qry_remain1.&#34;REMAIN_VALUE&#34;&#62;,MasterData1)]"/>
    </TfrxGroupFooter>
  </TfrxReportPage>
  <TfrxDialogPage Name="DialogPage1" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" DoubleBuffered="False" Height="201" ClientHeight="169" Left="431" Top="167" Width="489" Scaled="True" ClientWidth="483" OnActivate="DialogPage1OnActivate">
    <TfrxLabelControl Name="Label3" Left="57" Top="90" Width="31" Height="33" Font.Charset="222" Font.Color="-16777208" Font.Height="-29" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" ShowHint="True" Caption="คลัง" Color="16768462"/>
    <TfrxDBLookupComboBox Name="cbb_STOCK" Left="113" Top="92" Width="261" Height="29" Font.Charset="222" Font.Color="-16777208" Font.Height="-24" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" ShowHint="True" DataSet="qry_STOCK" DataSetName="qry_STOCK" ListField="DEPT_NAME" KeyField="DEPT_ID" DropDownWidth="0" DropDownRows="7"/>
    <TfrxBitBtnControl Name="bt_ok" Left="185" Top="131" Width="75" Height="33" Font.Charset="222" Font.Color="-16777208" Font.Height="-24" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" ShowHint="True" Caption="ตกลง" ModalResult="1" OnClick="bt_okOnClick"/>
    <TfrxCheckBoxControl Name="chk_all" Left="383" Top="98" Width="73" Height="17" ShowHint="True" Caption="ทุกคลัง" Color="16768462" OnClick="chk_allOnClick"/>
    <TfrxEditControl Name="m1" Left="112" Top="52" Width="61" Height="25" ShowHint="True" Color="-16777211" MaxLength="0" PasswordChar="0" Text="02"/>
    <TfrxLabelControl Name="Label1" Left="56" Top="49" Width="40" Height="33" Font.Charset="222" Font.Color="-16777208" Font.Height="-29" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" ShowHint="True" Caption="เดือน" Color="16768462"/>
    <TfrxLabelControl Name="Label6" Left="191" Top="48" Width="12" Height="33" Font.Charset="222" Font.Color="-16777208" Font.Height="-29" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" ShowHint="True" Caption="ปี" Color="16768462"/>
    <TfrxEditControl Name="y1" Left="216" Top="52" Width="81" Height="25" ShowHint="True" Color="-16777211" MaxLength="0" PasswordChar="0" Text="2557"/>
  </TfrxDialogPage>
</TfrxReport>
