Advertisement
dimas_subaktianto

query lampiran list faktur

Nov 24th, 2022
746
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  SELECT
  2.         S.SALE_INVO_NO,
  3.         S.ORG_INVO_NO ,
  4.         TO_CHAR(S.SEND_DMT,
  5.         'DD/MM/YYYY') AS SEND_DMT ,
  6.         TO_CHAR(S.DELIV_END_DMT,
  7.         'DD/MM/YYYY') AS DELIV_END_DMT ,
  8.         (SUM(C.ROW_SUM) + SUM(GET_PNL_BYINVO(S.DELIV_END_DMT,
  9.         S.SALE_INVO_NO))) AS TOTAL,
  10.         SUM(GET_PNL_BYINVO(S.DELIV_END_DMT,
  11.         S.SALE_INVO_NO)) AS PENALTI,
  12.         US_FI.GETCDNM(S.USE_CURY) AS USE_CURY_NM
  13.     FROM
  14.         US_FI.TBFI_WARNING_LETTERS SD ,
  15.         US_FI.TBFI_SALE_INVO S,
  16.         US_FI.TBFI_SALE_INVO_DETL C
  17.     WHERE
  18.         SD.SALE_INVO_NO = S.SALE_INVO_NO
  19.         AND S.SALE_INVO_NO  = C.SALE_INVO_NO
  20.         AND SD.DOC_NO =${doc_no}
  21.     GROUP BY
  22.         S.SALE_INVO_NO,
  23.         S.ORG_INVO_NO,
  24.         S.SEND_DMT,
  25.         S.DELIV_END_DMT,
  26.         SD.DOC_AMT,
  27.         S.USE_CURY
  28.     ORDER BY
  29.         S.SALE_INVO_NO
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement