Forum ini untuk laporan bugs / eror program dan lain-lain
harisby
 
Posts: 24
Joined: 29 Sep 2015 15:59

Rekon AR, bisa overpay

by harisby 10 Jun 2017 11:09

Database DB_AZURE, jalankan query sbb:

Code: Select all
select * from accounting.[journal.detail] where abs(gl_value) < abs(gl_match)


Pelunasan AR bisa melebihi nilai Rp. nota, padahal seharusnya kelebihan itu harusnya menjadi Debit Note (DN).

Pada trigger [Accounting].[Journal.Match.Calculate] ON [Accounting].[Journal.Match]:

Code: Select all
 
update a set a.gl_match=isnull(c.gl_match,0),a.gl_fmatch=isnull(c.gl_fmatch,0) 
 from Accounting.[Journal.Detail] a   
  inner join (select gl_id from inserted union select gl_id from deleted) b on a.gl_id=b.gl_id 
  left join ( 
   select a.gl_id,sum(gl_value) as gl_match,sum(gl_fvalue) as gl_fmatch   
     from Accounting.[Journal.Match] a 
     group by a.gl_id) c on a.gl_id=c.gl_id 


tidak ada pengecekan, langsung update kolom gl_match.

Pada sistem lama (SOLITAIRE), terdapat kondisi WHERE ... di mana kedua record yang akan di-matching harus:
punya acc_no sama, punya gl_subcode sama, gl_match tidak melebihi gl_value.

Apakah tidak perlu dilakukan pengecekan yang sama di Graylite?
Return to Report Bug / Error here

Who is online

Users browsing this forum: No registered users and 0 guests