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?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
January 14, 2020 at 5:07 pm
Question
January 14, 2020 at 5:30 pm
Question
My mind-reading capabilities are lacking today, so please state your question here.
By the way, questions end with a question mark (?)
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply