you're reading...
ACCURATE, Template

Hanya Parent Item di Preview SI

Berikut ini langkah-langkah untuk di Preview Sales Invoice yang ditampilkan nama Parent Item nya :

1. Setup | Form Template | Sales Invoice, edit template SI yang dimaksud.

2. Klik Button Design as Frf, lalu klik halaman Page2.

3. Klik sekali di ibx ke tiga dari kiri, kemudian tekan F11 di keyboard.

4. Akan keluar Object Inspector, double klik dibagian SQL.

5. Ganti SQL Editor (hapus semua tulisan disana) dan ganti dengan skrip berikut :

Select NULL ARINVOICEID, 1 SEQ, NULL USEDINSIID,
NULL USEDINSI, NULL INVOICENO, NULL PONOFROMDO,
IP.ITEMNO, IP.ITEMDESCRIPTION ITEMOVDESC,
SUM(cast(a.QUANTITY as double precision)*cast(a.UNITRATIO as double precision)) QUANTITY,
NULL ITEMDISCPC,
(SUM((cast(a.BRUTOUNITPRICE as double precision)*cast(a.QUANTITY as double precision))-(select RESULT from CALCPERCENT(a.ITEMDISCPC, a.BRUTOUNITPRICE*a.QUANTITY)))/SUM(cast(a.QUANTITY as double precision)*cast(a.UNITRATIO as double precision))) BRUTOUNITPRICE, 0 UNITPRICE,
0 ITEMHISTID, 0 ITEMCOST, 0 ITEMCOSTBASE,
NULL ITEMUNIT, 1 UNITRATIO, 0 ITEMTYPE,
NULL UNIT1, NULL UNIT2, NULL UNIT3, 1 RATIO2, 1 RATIO3, NULL NOTES,
NULL INVENTORYGLACCNT, NULL COGSGLACCNT, NULL SALESGLACCNT,
NULL SALESDISCOUNTACCNT, NULL GOODSTRANSITACCNT,
NULL TAXCODES, NULL TAXABLEAMOUNT1, NULL TAXABLEAMOUNT2,
NULL ITEMRESERVED1, NULL ITEMRESERVED2, NULL ITEMRESERVED3,
NULL ITEMRESERVED4, NULL ITEMRESERVED5, NULL ITEMRESERVED6,
NULL ITEMRESERVED7, NULL ITEMRESERVED8, NULL ITEMRESERVED9,
NULL ITEMRESERVED10, NULL SOID, NULL SOSEQ, NULL SONO, NULL PONOFROMSO,
NULL DEPTID, NULL DEPTNO, NULL DEPTNAME,
NULL PROJECTID, NULL PROJECTNO, NULL PROJECTNAME,
NULL WAREHOUSEID, NULL WPIName, NULL QuoteID, NULL QuoteNo, NULL SNLine, NULL SNExpDate
From TEMPLATE_ARINVDET(:ARINVOICEID, 0) a
left outer join Item I on I.ItemNo=a.ItemNo
left outer join Item IP on IP.ItemNo=I.ParentItem
Where 1=1
GROUP BY IP.ITEMNO, IP.ITEMDESCRIPTION

6. Kemudian klik tanda cawang di SQL Editor tsb untuk Save. Close Designer, dan pilih Yes untuk konfirmasi Save Changes.

7. Coba preview Invoice.

Catatan : Perlu diketahui dengan cara diatas, maka yang ditampilkan di kolom UnitPrice adalah nilai Amount/Qty.

(Available for v4)

Advertisements

Discussion

Comments are closed.

%d bloggers like this: