<?xml version="1.0" encoding="utf-8"?>
<TfrxReport Version="5.2.12" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="41380.5820669097" ReportOptions.Description.Text="" ReportOptions.LastChange="42533.7323829514" ScriptLanguage="PascalScript" ScriptText.Text="var&#13;&#10; lineno: integer ;&#13;&#10; qty_orderx: string ;                                          &#13;&#10;   &#13;&#10;procedure Page1OnBeforePrint(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;  lineno:= 0 ;&#13;&#10;    &#13;&#10;end;&#13;&#10;&#13;&#10;procedure LineOnBeforePrint(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10; // lineno:=lineno+1 ;                                     &#13;&#10;end;&#13;&#10;&#13;&#10;procedure Memo11OnBeforePrint(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;    if (&#60;SMPOC.&#34;QTY_RCV&#34;&#62;mod&#60;SMPOC.&#34;PACK_RATIO&#34;&#62;)  &#62;   0 then &#13;&#10;     qty_orderx:= inttostr(TRUNC(&#60;SMPOC.&#34;QTY_RCV&#34;&#62;/&#60;SMPOC.&#34;PACK_RATIO&#34;&#62;))+ ' x ' + inttostr(&#60;SMPOC.&#34;PACK_RATIO&#34;&#62;) +' (+' + inttostr(&#60;SMPOC.&#34;QTY_RCV&#34;&#62;mod&#60;SMPOC.&#34;PACK_RATIO&#34;&#62;)+')'        &#13;&#10;     else &#13;&#10;      qty_orderx:= inttostr(TRUNC(&#60;SMPOC.&#34;QTY_RCV&#34;&#62;/&#60;SMPOC.&#34;PACK_RATIO&#34;&#62;))+ ' x ' + inttostr(&#60;SMPOC.&#34;PACK_RATIO&#34;&#62;) ;     &#13;&#10;       &#13;&#10;end;&#13;&#10;&#13;&#10;procedure MasterData1OnBeforePrint(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;  &#13;&#10;    if &#60;SMPOC.&#34;CANCEL_DISP&#34;&#62;&#60;&#62;'' then&#13;&#10;    begin&#13;&#10;      MasterData1.visible:=False ;&#13;&#10;    end&#13;&#10;    else&#13;&#10;    begin&#13;&#10;        MasterData1.visible:=True ;&#13;&#10;       lineno:=lineno+1 ;           &#13;&#10;    end;        &#13;&#10;   &#13;&#10;     &#13;&#10;end;&#13;&#10;&#13;&#10;begin&#13;&#10;&#13;&#10;end.">
  <Datasets>
    <item DataSet="frxDBDataset1" DataSetName="SMPOC"/>
  </Datasets>
  <Variables>
    <item Name="sub_po_no"/>
    <item Name="dept_name"/>
    <item Name="po_date"/>
    <item Name="stockname"/>
    <item Name="consol_item"/>
    <item Name="hosp_name"/>
  </Variables>
  <TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000"/>
  <TfrxReportPage Name="Page1" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="" OnBeforePrint="Page1OnBeforePrint">
    <TfrxMasterData Name="MasterData1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="26.45671" Left="0" Top="268.34663" Width="718.1107" OnBeforePrint="MasterData1OnBeforePrint" AllowSplit="True" ColumnWidth="0" ColumnGap="0" DataSet="frxDBDataset1" DataSetName="SMPOC" RowCount="0" Stretched="True">
      <TfrxMemoView Name="Memo5" Left="29" Top="0.67718" Width="52.91342" Height="22.67718" AllowHTMLTags="True" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="[SMPOC.&#34;WORKING_CODE&#34;]"/>
      <TfrxMemoView Name="Memo7" ShiftMode="smWhenOverlapped" Left="82.69295" Top="0.67718" Width="347.71676" Height="22.67718" StretchMode="smMaxHeight" AllowHTMLTags="True" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="[TRIM(&#60;SMPOC.&#34;DRUG_NAME&#34;&#62;)]"/>
      <TfrxMemoView Name="Memo8" Left="474.00804" Top="0.01577" Width="41.57483" Height="22.67718" AllowHTMLTags="True" DataSet="frxDBDataset1" DataSetName="SMPOC" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[SMPOC.&#34;SALE_UNIT&#34;]"/>
      <TfrxMemoView Name="Memo9" Left="432.09462" Top="0.23624" Width="49.13389" Height="22.67718" AllowHTMLTags="True" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="[SMPOC.&#34;LOT_NO&#34;]"/>
      <TfrxMemoView Name="Memo11" Left="514.30736" Top="0.22047" Width="60.47248" Height="22.67718" OnBeforePrint="Memo11OnBeforePrint" StretchMode="smActualHeight" AllowHTMLTags="True" DisplayFormat.FormatStr="%2.0n" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[qty_orderx]"/>
      <TfrxMemoView Name="Line" Left="1.55906" Top="1.45671" Width="26.45671" Height="22.67718" OnBeforePrint="LineOnBeforePrint" DataSet="frxDBDataset1" DataSetName="SMPOC" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[lineno]. "/>
      <TfrxMemoView Name="Memo24" Left="635.94527" Top="0.89765" Width="75.5906" Height="22.67718" DisplayFormat.FormatStr="%2.2n" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[&#60;SMPOC.&#34;VALUE&#34;&#62;]"/>
      <TfrxMemoView Name="SMPOCexpired_date" Left="575.9295" Top="1.67718" Width="68.03154" Height="22.67718" DataSet="frxDBDataset1" DataSetName="SMPOC" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[COPY(&#60;SMPOC.&#34;EXPIRED_DATE&#34;&#62;,7,2)]/[COPY(&#60;SMPOC.&#34;EXPIRED_DATE&#34;&#62;,5,2)]/[COPY(&#60;SMPOC.&#34;EXPIRED_DATE&#34;&#62;,1,4)]"/>
    </TfrxMasterData>
    <TfrxPageFooter Name="PageFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="230.55133" Left="0" Top="449.76407" Width="718.1107">
      <TfrxMemoView Name="Memo15" Left="20.01577" Top="73.69295" Width="249.44898" Height="49.13389" Font.Charset="1" Font.Color="0" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="ลงชื่อ............................................(ผู้เบิก)&#13;&#10;(.............................................)"/>
      <TfrxMemoView Name="Memo16" Left="20.01577" Top="164.60637" Width="249.44898" Height="49.13389" Font.Charset="1" Font.Color="0" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="ลงชื่อ............................................(ผู้อนุมัติ)&#13;&#10;(.............................................)"/>
      <TfrxMemoView Name="Memo25" Left="443.32313" Top="73.69295" Width="249.44898" Height="49.13389" Font.Charset="1" Font.Color="0" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="ลงชื่อ............................................(ผู้จ่าย)&#13;&#10;(.............................................)"/>
      <TfrxMemoView Name="Memo26" Left="443.32313" Top="163.82684" Width="249.44898" Height="49.13389" Font.Charset="1" Font.Color="0" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="ลงชื่อ............................................(ผู้รับ)&#13;&#10;(.............................................)"/>
    </TfrxPageFooter>
    <TfrxPageHeader Name="PageHeader1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="166.29932" Left="0" Top="18.89765" Width="718.1107">
      <TfrxMemoView Name="Memo2" Left="3.77953" Top="2.33859" Width="718.1107" Height="26.45671" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="1" HAlign="haCenter" ParentFont="False" Text="[hosp_name]"/>
      <TfrxMemoView Name="Memo4" Left="5.55906" Top="29.01577" Width="714.33117" Height="26.45671" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="ใบอนุมัติเบิก"/>
      <TfrxMemoView Name="Memo6" Left="6.55906" Top="56.91342" Width="442.20501" Height="75.5906" AllowHTMLTags="True" Font.Charset="222" Font.Color="-16777208" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="&#60;b&#62;เลขที่เบิก&#60;/b&#62;  [sub_po_no]      &#13;&#10;&#60;b&#62;หน่วยงานที่ขอเบิก&#60;/b&#62;  [dept_name]&#13;&#10;อนุมัติให้เบิกเวชภัณฑ์ตามรายการต่อไปนี้"/>
      <TfrxMemoView Name="Memo1" Left="597.16574" Top="11.55906" Width="117.16543" Height="26.45671" Font.Charset="1" Font.Color="0" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="หน้า [Page#]/[TotalPages#]"/>
      <TfrxMemoView Name="Memo18" Left="438.42548" Top="64.25201" Width="275.90569" Height="56.69295" AllowHTMLTags="True" Font.Charset="222" Font.Color="-16777208" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="&#60;b&#62;วันที่อนุมัติ&#60;/b&#62;  [po_date]     &#13;&#10;&#60;b&#62;หน่วยงานที่จ่าย&#60;/b&#62; [stockname]"/>
      <TfrxLineView Name="Line3" Left="1.22047" Top="138.84261" Width="714.33117" Height="0" Color="0" Frame.Color="12632256" Diagonal="True"/>
      <TfrxLineView Name="Line4" Left="0.22047" Top="164.96073" Width="714.33117" Height="0" Color="0" Frame.Color="12632256" Diagonal="True"/>
      <TfrxMemoView Name="Memo12" Left="202.53556" Top="139.28355" Width="83.14966" Height="22.67718" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="ชื่อเวชภัณฑ์"/>
      <TfrxMemoView Name="Memo14" Left="581.37044" Top="139.06308" Width="68.03154" Height="26.45671" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="วันหมดอายุ"/>
      <TfrxMemoView Name="Memo17" Left="662.5201" Top="138.06308" Width="52.91342" Height="22.67718" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="รวมมูลค่า"/>
      <TfrxMemoView Name="Memo21" Left="523.7483" Top="138.84261" Width="56.69295" Height="26.45671" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="จน.อนุมัติ"/>
      <TfrxMemoView Name="Memo3" Left="35.55906" Top="138.84261" Width="49.13389" Height="22.67718" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="รหัสยา"/>
      <TfrxMemoView Name="Memo19" Left="432.55133" Top="137.84261" Width="49.13389" Height="22.67718" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="Lot no."/>
      <TfrxMemoView Name="Memo20" Left="481.80334" Top="138.62214" Width="34.01577" Height="22.67718" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="หน่วย"/>
    </TfrxPageHeader>
    <TfrxReportSummary Name="ReportSummary1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="0" Left="0" Top="427.08689" Width="718.1107"/>
    <TfrxGroupHeader Name="GroupHeader1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="0" Left="0" Top="245.66945" Width="718.1107" Condition="SMPOC.&#34;SUB_PO_NO&#34;" KeepTogether="True" StartNewPage="True"/>
    <TfrxGroupFooter Name="GroupFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="49.13389" Left="0" Top="317.48052" Width="718.1107">
      <TfrxMemoView Name="Memo27" Left="121.94496" Top="11.26778" Width="593.38621" Height="30.23624" AllowHTMLTags="True" DisplayFormat.FormatStr="%2.0n" Font.Charset="1" Font.Color="0" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="รวมทั้งหมด  &#60;b&#62;[COUNT(MasterData1)]&#60;/b&#62;   รายการ  คิดเป็นมูลค่า &#60;b&#62;[FormatFloat('#,##0.00',SUM(&#60;SMPOC.&#34;VALUE&#34;&#62;,MasterData1))]&#60;/b&#62;  บาท"/>
      <TfrxLineView Name="Line1" Left="3.77953" Top="8.60637" Width="710.55164" Height="0" Color="0" Frame.Color="12632256" Diagonal="True"/>
    </TfrxGroupFooter>
  </TfrxReportPage>
</TfrxReport>
