January 14, 2020 at 4:42 pm
Hi
ALTER procedure [dbo].[GST_Report_GSTR3B_APAR_Test](
@fromDate date,
@toDate date,
@locGSTN nvarchar(15))
as
begin
IF object_id('GST_Report_GSTR3B_APAR_Tab','u') is not null
drop table GST_Report_GSTR3B_APAR_Tab
select t0.*
into GST_Report_GSTR3B_APAR_Tab
from (select case when ObjType = 14 then -BaseSum
else BaseSum end as BaseSum,
case when ObjType = 14 then -IGSTSum
else IGSTSum end as IGSTSum,
case when ObjType = 14 then -CGSTSum
else CGSTSum end as CGSTSum,
case when ObjType = 14 then -SGSTSum
else SGSTSum end as SGSTSum,
case when ObjType = 14 then -CessSum
else CessSum end as CessSum,
'GR' as ItemTaxType ,CardName,DocEntry,DocNum,DocDate,LocGSTN
from GST_ODOC_Result_Ignore_RvsCharge t0
where ObjType in (13, 14)
and (ItemTaxType <> 'GE' and PureNilRateDoc = 'N')
and not (ImpOrExp = 'Y' and ExportType <> 'D')
) t0
insert into GST_Report_GSTR3B_APAR_Tab
select case when ObjType = 14 then -BaseSum
else BaseSum end as BaseSum,
case when ObjType = 14 then -IGSTSum
else IGSTSum end as IGSTSum,
case when ObjType = 14 then -CGSTSum
else CGSTSum end as CGSTSum,
case when ObjType = 14 then -SGSTSum
else SGSTSum end as SGSTSum,
case when ObjType = 14 then -CessSum
else CessSum end as CessSum,
'ZZ' as ItemTaxType ,CardName,DocEntry,DocNum,DocDate,LocGSTN
from GST_ODOC_Result_Ignore_RvsCharge
where ObjType in (13, 14)
and (ItemTaxType <> 'GE' and PureNilRateDoc = 'N')
and ImpOrExp = 'Y' and ExportType <> 'D'
End
Thanks
January 14, 2020 at 4:49 pm
Is this a blog post, or do you have a question?
January 14, 2020 at 5:07 pm
Question
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy