
acc.trade.purRtTxInAdj.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of beige-acc Show documentation
Show all versions of beige-acc Show documentation
It consists of double entry accounting and trading (web-store) business logic.
It's based on previous beigesoft-accounting and beigesoft-webstore projects.
The newest version!
select TXCT as TXCTID, TXCTLN.TAX as TAXID, TAX.NME as TAXNME, RATE, sum(SUBT) as SUBT, sum(SUFC) as SUFC, min(TOTX) as TOTX, min(TXFC) as TXFC, sum(TOT) as TOT, sum(TOFC) as TOFC
from
( select PUINGDLN.TXCT, PURTLN.SUBT, PURTLN.SUFC, PURTLN.TOT, PURTLN.TOFC from PURTLN
join PUINGDLN on PUINGDLN.IID=PURTLN.INVL
where PUINGDLN.TXCT is not null and PURTLN.RVID is null and PURTLN.OWNR=:INVID
) as ALLNS
join TXCT on TXCT.IID=ALLNS.TXCT
join TXCTLN on TXCTLN.OWNR=TXCT.IID
join TAX on TXCTLN.TAX=TAX.IID
join (select TAX, TOT as TOTX, TOFC as TXFC from PURTTXLN where OWNR=:INVID) as INVTLNS on TXCTLN.TAX=INVTLNS.TAX
group by TXCTID, TAXID, TAXNME, RATE
order by TAXID;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy