Menampilkan FormNo ReceivedItem di preview Purchase Invoice

  1. Setup | Form Template | Purchase Invoice, edit template yang dimaksud.
  2. Klik button Design As frf, lalu pilih Page2. Klik sekali di IBX ke dua dari kanan, kemudian tekan F11 di keyboard, akan muncul tampilan Oboject Inspector(qryAPItmDet: TfrlBXQuery), double klik bagian SQL.
  3. Tambahkan :
  • “b.SEQUENCENO” sebelum baris “From TEMPLATE_APITMDET(:APInvoiceID) a“
  • Tambahkan “left outer join APINV b on b.APINVOICEID=(SELECT MIN(APINVOICEID) FROM APINV c WHERE c.INVOICENO=a.INVOICENO)” sesudah baris “From TEMPLATE_APITMDET(:APInvoiceID) a“

Sehingga keseluruhan SQL-nya menjadi sbb :

Select a.APINVOICEID, a.SEQ, a.BILLID,
a.INVOICENO PINO,
a.ITEMNO, a.ITEMOVDESC, a.QUANTITY,
a.ITEMDISCPC, a.BRUTOUNITPRICE, a.UNITPRICE,
a.ITEMHISTID, a.ITEMCOST, a.ITEMCOSTBASE,
a.ITEMUNIT, a.UNITRATIO,
a.ITEMTYPE, a.UNIT1, a.UNIT2, a.UNIT3, a.RATIO2, a.RATIO3, a.NOTES,
a.INVENTORYGLACCNT, a.COGSGLACCNT, a.SALESGLACCNT, a.UNBILLEDACCOUNT,
a.TAXCODES, a.TAXABLEAMOUNT1, a.TAXABLEAMOUNT2,
a.ITEMRESERVED1, a.ITEMRESERVED2, a.ITEMRESERVED3, a.ITEMRESERVED4,
a.ITEMRESERVED5, a.ITEMRESERVED6, a.ITEMRESERVED7, a.ITEMRESERVED8,
a.ITEMRESERVED9, a.ITEMRESERVED10,
a.POID, a.POSEQ, a.PONO,
a.DEPTID, a.DEPTNO, a.DEPTNAME,
a.PROJECTID, a.PROJECTNO, a.PROJECTNAME,
a.WAREHOUSEID, a.NAME WPIName, a.ReqNo RequestNo, a.SNLine, a.SNExpDate,
a.QTYCONTROL, b.SEQUENCENO
From TEMPLATE_APITMDET(:APInvoiceID) a

left outer join APINV b on b.APINVOICEID=(SELECT MIN(APINVOICEID) FROM APINV c WHERE c.INVOICENO=a.INVOICENO)
Where 1=1
Order by A.APInvoiceID, a.SEQ
4. Kemudian klik tanda centang(ok), kembali ke Page1.
5. Masih di Designer ke menu File | Data Disctionary,  pilih folder Invoice Item,  kemudian klik icon New Variable dibawah, akan muncul satu field NewVariable rename menjadi “FormNoRI“. Biarkan posisi kita masih di FormNo tsb,  Values-nya(kolom bagian kanan) kita isi dengan cara memilih memilih “SEQUENCENO” dari “DialogForm.qryAPItmDet”.
6. Gunakan variable [FormNoRI] dikolom mana mau ditampilkan.
Gallery | This entry was posted in Template. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s