Saturday, June 24, 2017

GST New Patch Release on 22nd June for NAV 2016, NAV 2013 R2 and NAV 2013

Hello Friends,

Microsoft India has release the New Update for GST as per new rule draft on 3rd June 2017

Features included in this Release

  • Credit Flow changes ( from Interim to Recoverable account)
  • Sub-Contracting changes
  • Exempted Good & Service for Service transfers and Service management
  • Input Service Distribution transaction changes based on Credit flow changes
  • Reconciliation changes based on revised Credit flow
  • Cr. Adjustment journal changes based on revised Credit flow
  • Advance Payment application changes (based on rules released on 3rd Jun )
  • Reverse Charge changes based on services ( based on rules released on 3rd Jun)

Features excluded in this Release

  • As per rules released in June'17, there are substantial changes in following features and will be delivered in Aug'17 release.
  • GST TDS / TCS
  • Settlement
  • Input Service Distribution (only distribution part)
  • GSTR returns (1, 2, 6 & 8)
  • GSTR 3B – formats not released yet
  • GSTR file formats

Get the more detail at : 

Friday, June 16, 2017

GSTN's Offline Tool (Import from Excel, CSV)

Hello Friends,

For the taxpayers' convenience, the Goods and Services Tax Network (GSTN) has announced the launch of its Offline Tool, where data on invoices (business to business), exports and supplies to consumers that are required to create GSTR-1 (Outward Supply Return), can be entered in an excel sheet without being connected to the Internet.
Addressing a meeting with the GST Suvidha Providers (GSPs) on Saturday, the GSTN revealed that taxpayers using the Offline Tool will not require the services of any GSP. Similarly, those having small number of business to business invoices, like retailers and small traders, can do the data entry on portal itself and will not require the services of GSPs.
At desired interval, the tool can be run to upload all such data on the portal. Only while uploading the data on GST portal, Internet connectivity will be required.
The Offline Tool will be provided free of cost and taxpayers will be able to download it from the GST portal from last week of June.
GSTN will release the Excel format, in which businesses will start maintaining the data from July 1 for using the free offline tool for uploading the invoice and other return data.
Chaired in the presence of Arun Goyal, Additional Secretary, GST Security Council, the GSTN Chairman, during the meeting, presented the timelines of the release of updated specifications of APIs for the new GSTR forms that are to be applicable from July 1.
The API specifications will be released in staggered manner for all the GSPs and their partner ASPs so that they can study and analyse the same for making changes in their software developed on old design of returns.
The GSTN will also make available live APIs on the sandbox for testing of the codes that the GSPs will modify.
The requirement of the GSPs being secure and ensuring security of the GST system was also stressed during the meeting. GSPs were advised to conduct system audits as per the prevailing ISO standard on security from one of the auditors on the panel of CERT-IN before they connect with and start pushing data into the GST System.
The GSTN also highlighted the need for the GSPs to constantly monitor the GSP ecosystem webpage on the GSTN webpage for all relevant updates and guidelines.

FAQ:

How can I download and install the GST Offline Utility tool on my system from the GST Portal?

1. Login to the beta testing Portal https://www.prod.gst.gov.in and download Offline Utility.
2. Go to Downloads > Offline Utilities > Returns Offline Utility > Download button.
3. Unzip the downloaded Zip file which contain offline-utility.exe setup file, Sample_files folder, Readme.txt and User Manual
• offline-utility.exe setup file for the Offline Utility to be installed in the local machine (your computer).
• Sample_files folder which contains the excel template with some sample data which can be edited as per your requirements for importing data in the Offline Utility.
• A document “Readme.txt” explaining in detail the prerequisites (system and software requirements of the computer in which the Offline Utility is to be installed) for successful working of the Offline Utility.
Note: Ensure that the system requirements are met including the disk space of 50 MB.
• Invoice Upload Offline Utility User Manual to view the detailed steps and screenshots to upload the invoices through the Offline Utility.
4. Install the Offline Utility by double clicking the Offline Utility.exe set up file and browse the location where you want to store the Offline Utility files.
Note: Avoid installing the utility in the same location where you have saved the zipped files.
5. In the device Home Page, GST Offline Utility Logo (National Emblem) & Name of the app will appear.
6. Fill the invoice details in the Offline Utility manually or use sample templates.
The GST Offline Utility Logo will appear as shown below:
GST Offline Utility Logo
Important Note: – In case, User un-installs the utility and again re-installs the utility, he should re-install at the same location. In case, User re-installs the Utility on different location he has to restart the system so that utility refers to new location. If user will not restart the system offline utility tool will refer the old path and will not open the project.

How can I fill the Invoice data in offline mode through GST Offline Utility tool?

Once you have downloaded and installed the Offline Utility, you can use any of the four options to upload the invoice data.
• Option 1: Manual Entry of Invoice Data
• Option 2: Copy and Paste from Excel Workbook
• Option 3: Import full Excel Workbook consisting of multiple sheets
• Option 4: Import the csv file
Read the Invoice Upload Offline Utility.pdf for detailed steps.

3. How can I upload the invoice data on the GST Portal?

After generating the return file in json format through Offline Utility, login to the https://www.prod.gst.gov.in URL for uploading the invoices.

Ensure that you are connected to the Internet to upload the invoices.

What will happen if I am not connected to Internet while uploading the json file on the GST Portal?

After preparing return & once json file is generated, you need to login to the https://www.prod.gst.gov.in URL for which you need to have the Internet connection.

5. What will happen if the file size of generated json is more than 5 MB?

GST Portal doesn’t allow json file to be uploaded with file size more than 5 MB. Delete some invoices in order to generate the json with file size less than 5 MB. You can generate the file again with these deleted invoices to upload the same on the Portal.

6. How can I check the file size of the generated json file?

Right click on the file and click on Properties. You can see the size of the generated json file.

7. How many maximum number of invoices can be uploaded through Offline Utility in one go?

You can add up to 19000 line items comprising of all the different sections like b2b and b2c (large) in an offline mode. This implies that there are several line items in an invoice, the number of invoices would be much less than 19000. You can upload them in one go on the portal using the Internet.
In case you have more invoice data, you can use the tool multiple times to generate the json file to upload the invoice data.

8. Is it mandatory to fill all sections in multi excel file? Can I use multi section excel file even though I have limited section data?

Filling of all sections is not mandatory. You can use the excel to enter data for selective sections also. Remaining sections can be kept as blank and the Offline Utility will take care of those sections.

9. How can I check the status of uploaded invoices if I have submitted the same through GST Offline Utility tool?

You can check the status of the uploaded invoice details on the Portal once json file is uploaded post login. You can check the details of the invoices uploaded after 15-20 minutes in the GSTR-1 summary.

10. Can I edit invoices uploaded through Offline Utility in the GST Portal?

You can edit the invoices uploaded through Offline Utility in the GST Portal at any time.

11. Can I generate multiple json files for a single tax period?

Yes. You can generate multiple json files for a single tax period.

12. What is the maximum size of JSON file?

Maximum size of the json file is 5 MB.

13. What are the basic checks that I have to do in the Offline Utility tool to ensure proper upload of json so that I don’t get any error while uploading the json file on the GST Portal?

You need to check that section wise all fields are filled properly without any error or omission. Utility will highlight fields having errors in RED colour.

14. I have uploaded 100 invoices but only 85 invoices are visible on the GST Portal. Why?

For these 5 invoices, the validations already present in the Portal have failed and therefore these 5 invoices have been rejected.

15. I am not able to check the details of the rejected invoices. Why?

For current beta testing, user can upload the data but cannot check the details of the rejected invoices. This facility will be available in future. Generally the invoices gets rejected due to following reasons:
a. Date is not in following format : DD/MM/YYYY or DD-MM-YYYY
b. Date of invoice is after the date of Tax Period
c. Receiver GSTIN is same as of Supplier
d. No Invoice exists against corresponding Credit/debit note in case of Supplies to Registered Taxpayers or Interstate Large Customers
e. Shipping bill date is prior to date of invoice.

16. Copy & Paste excel option is showing error as invalid input. What it means?

You have to copy the header sections along with the data while copying the data.

17. Where will the generated JSON file get saved?

By default, it will be saved in the Downloads folder. You can also choose a different location to save the same.

18. Can I install the Offline Utility in my mobile device?

No. Utility.exe setup file cannot be installed in the mobile device.

19. When I uploaded the excel, my non-editable data (unique id) was wrong. When I am looking into the uploaded data in summary it is showing red block as the data is incorrect. How can I correct this data?

You need to delete the specific invoice and then add a new invoice with the correct invoice details. The unique details cannot be edited by the user.

20. When I uploaded the json on the GST portal it has generated the reference ID but I am unable to see the Invoice details added.

It can take few minutes to display the invoice details.


Sunday, June 11, 2017

SQL QUERY To Identify CPU Use for Query Executing

Hello Friends,

I want share some of my favorite SQL Query to identify SQL Per-formation.

-- Requests by CPU consumption.
SELECT  der.session_id ,
        DB_NAME(der.database_id) AS database_name ,
        deqp.query_plan ,
        SUBSTRING(dest.text, der.statement_start_offset / 2,
                  ( CASE WHEN der.statement_end_offset = -1
                         THEN DATALENGTH(dest.text)
                         ELSE der.statement_end_offset
                    END - der.statement_start_offset ) / 2)
                                        AS [statement executing] ,
        der.cpu_time
      --der.granted_query_memory
      --der.wait_time
      --der.total_elapsed_time
      --der.reads
FROM    sys.dm_exec_requests der
        INNER JOIN sys.dm_exec_sessions des
                       ON des.session_id = der.session_id
        CROSS APPLY sys.dm_exec_sql_text(der.sql_handle) dest
        CROSS APPLY sys.dm_exec_query_plan(der.plan_handle) deqp
WHERE   des.is_user_process = 1
        AND der.session_id <> @@spid
ORDER BY der.cpu_time DESC ;

-----------------------------------------------------------------------------------------------------------------------

SELECT TOP 50
SUBSTRING(eqt.TEXT,(
       eqs.statement_start_offset/2) +1
,((CASE eqs.statement_end_offset
  WHEN -1 THEN DATALENGTH(eqt.TEXT)
  ELSE  eqs.statement_end_offset
  END - eqs.statement_start_offset)/2)+1)
,eqs.execution_count
,eqs.total_logical_reads
,eqs.last_logical_reads
,eqs.total_logical_writes
,eqs.last_logical_writes
,eqs.total_worker_time
,eqs.last_worker_time
,eqs.total_elapsed_time/1000000           AS Total_elapsed_time_Secs
,eqs.last_elapsed_time/1000000            AS Last_elapsed_time_Secs
,eqs.last_execution_time
,eqp.query_plan
FROM        sys.dm_exec_query_stats eqs
CROSS APPLY sys.dm_exec_sql_text(eqs.sql_handle) eqt
CROSS APPLY sys.dm_exec_query_plan(eqs.plan_handle) eqp
ORDER BY eqs.total_worker_time DESC

SELECT TOP 50
SUBSTRING(eqt.TEXT,(
       eqs.statement_start_offset/2) +1
,((CASE eqs.statement_end_offset
  WHEN -1 THEN DATALENGTH(eqt.TEXT)
  ELSE  eqs.statement_end_offset
  END - eqs.statement_start_offset)/2)+1)
,eqs.execution_count
,eqs.total_logical_reads
,eqs.last_logical_reads
,eqs.total_logical_writes
,eqs.last_logical_writes
,eqs.total_worker_time
,eqs.last_worker_time
,eqs.total_elapsed_time/1000000           AS Total_elapsed_time_Secs
,eqs.last_elapsed_time/1000000            AS Last_elapsed_time_Secs
,eqs.last_execution_time
,eqp.query_plan
FROM        sys.dm_exec_query_stats eqs
CROSS APPLY sys.dm_exec_sql_text(eqs.sql_handle) eqt
CROSS APPLY sys.dm_exec_query_plan(eqs.plan_handle) eqp
ORDER BY eqs.total_worker_time DESC
--------------------------------------------------------------------------------------------------------------------------

WITH [Waits] AS (SELECT [wait_type],[wait_time_ms] / 1000.0 AS [WaitS], ([wait_time_ms] - [signal_wait_time_ms]) / 1000.0 AS [ResourceS],
[signal_wait_time_ms] / 1000.0 AS [SignalS],[waiting_tasks_count] AS [WaitCount],100.0 * [wait_time_ms] / SUM ([wait_time_ms]) OVER() AS [Percentage],
ROW_NUMBER() OVER(ORDER BY [wait_time_ms] DESC) AS [RowNum] FROM sys.dm_os_wait_stats
WHERE [wait_type] NOT IN (N'CLR_SEMAPHORE',N'LAZYWRITER_SLEEP',N'RESOURCE_QUEUE',N'SQLTRACE_BUFFER_FLUSH',N'SLEEP_TASK',N'SLEEP_SYSTEMTASK',
N'WAITFOR',N'HADR_FILESTREAM_IOMGR_IOCOMPLETION',N'CHECKPOINT_QUEUE', N'REQUEST_FOR_DEADLOCK_SEARCH',N'XE_TIMER_EVENT',N'XE_DISPATCHER_JOIN',
N'LOGMGR_QUEUE',N'FT_IFTS_SCHEDULER_IDLE_WAIT','BROKER_TASK_STOP', N'CLR_MANUAL_EVENT',N'CLR_AUTO_EVENT',N'DISPATCHER_QUEUE_SEMAPHORE',
N'TRACEWRITE',N'XE_DISPATCHER_WAIT',N'BROKER_TO_FLUSH',N'BROKER_EVENTHANDLER',N'FT_IFTSHC_MUTEX',  N'SQLTRACE_INCREMENTAL_FLUSH_SLEEP',
N'DIRTY_PAGE_POLL',  N'SP_SERVER_DIAGNOSTICS_SLEEP'))
SELECT [W1].[wait_type] AS [Wait_Type],[W1].[WaitCount] AS [Wait_Count],CAST ([W1].[Percentage] AS DECIMAL(4, 2)) AS [Wait_Time_%],
CAST ([W1].[WaitS] AS DECIMAL(14, 2)) AS [Wait_Time_Sec],CAST ([W1].[ResourceS] AS DECIMAL(14, 2)) AS [Resource_wait_Sec],
CAST ([W1].[SignalS] AS DECIMAL(14, 2)) AS [Signal_wait_Sec],GETDATE() AS [Current_Date]
FROM [Waits] AS [W1] INNER JOIN [Waits] AS [W2] ON [W2].[RowNum] <= [W1].[RowNum]
GROUP BY [W1].[RowNum], [W1].[wait_type], [W1].[WaitS],[W1].[ResourceS], [W1].[SignalS], [W1].[WaitCount], [W1].[Percentage]
HAVING SUM ([W2].[Percentage]) - [W1].[Percentage] < 95
order by Wait_Count desc

--------------------------------------------------------------------------------------------------------------------------
--Transaction log impact of active transactions.
SELECT DTST.[session_id],
 DES.[login_name] AS [Login Name],
 DB_NAME (DTDT.database_id) AS [Database],
 DTDT.[database_transaction_begin_time] AS [Begin Time],
 -- DATEDIFF(ms,DTDT.[database_transaction_begin_time], GETDATE()) AS [Duration ms],
 CASE DTAT.transaction_type
   WHEN 1 THEN 'Read/write'
    WHEN 2 THEN 'Read-only'
    WHEN 3 THEN 'System'
    WHEN 4 THEN 'Distributed'
  END AS [Transaction Type],
  CASE DTAT.transaction_state
    WHEN 0 THEN 'Not fully initialized'
    WHEN 1 THEN 'Initialized, not started'
    WHEN 2 THEN 'Active'
    WHEN 3 THEN 'Ended'
    WHEN 4 THEN 'Commit initiated'
    WHEN 5 THEN 'Prepared, awaiting resolution'
    WHEN 6 THEN 'Committed'
    WHEN 7 THEN 'Rolling back'
    WHEN 8 THEN 'Rolled back'
  END AS [Transaction State],
 DTDT.[database_transaction_log_record_count] AS [Log Records],
 DTDT.[database_transaction_log_bytes_used] AS [Log Bytes Used],
 DTDT.[database_transaction_log_bytes_reserved] AS [Log Bytes RSVPd],
 DEST.[text] AS [Last Transaction Text],
 DEQP.[query_plan] AS [Last Query Plan]
FROM sys.dm_tran_database_transactions DTDT
 INNER JOIN sys.dm_tran_session_transactions DTST
   ON DTST.[transaction_id] = DTDT.[transaction_id]
 INNER JOIN sys.[dm_tran_active_transactions] DTAT
   ON DTST.[transaction_id] = DTAT.[transaction_id]
 INNER JOIN sys.[dm_exec_sessions] DES
   ON DES.[session_id] = DTST.[session_id]
 INNER JOIN sys.dm_exec_connections DEC
   ON DEC.[session_id] = DTST.[session_id]
 LEFT JOIN sys.dm_exec_requests DER
   ON DER.[session_id] = DTST.[session_id]
 CROSS APPLY sys.dm_exec_sql_text (DEC.[most_recent_sql_handle]) AS DEST
 OUTER APPLY sys.dm_exec_query_plan (DER.[plan_handle]) AS DEQP
ORDER BY DTDT.[database_transaction_log_bytes_used] DESC;
-- ORDER BY [Duration ms] DESC;
-------------------------------------------------------------------------------------------------------------------------

--Tempdb usage
WITH    version_store ( [rowset_id], [bytes consumed] )
          AS ( SELECT TOP 1
                        [rowset_id] ,
                        SUM([record_length_first_part_in_bytes]
                            + [record_length_second_part_in_bytes])
                                                          AS [bytes consumed]
               FROM     sys.dm_tran_version_store
               GROUP BY [rowset_id]
               ORDER BY SUM([record_length_first_part_in_bytes]
                            + [record_length_second_part_in_bytes])
             )
    SELECT  VS.[rowset_id] ,
            VS.[bytes consumed] ,
            DB_NAME(DTVS.[database_id]) AS [database name] ,
            DTASDT.[session_id] AS session_id ,
            DES.[login_name] AS [session login] ,
            DEST.text AS [session command]
    FROM    version_store VS
            INNER JOIN sys.[dm_tran_version_store] DTVS
                         ON VS.rowset_id = DTVS.[rowset_id]
            INNER JOIN sys.[dm_tran_active_snapshot_database_transactions]
                                                                      DTASDT
                         ON DTVS.[transaction_sequence_num] =
                                           DTASDT.[transaction_sequence_num]
            INNER JOIN sys.dm_exec_connections DEC
                         ON DTASDT.[session_id] = DEC.[most_recent_session_id]
            INNER JOIN sys.[dm_exec_sessions] DES
                         ON DEC.[most_recent_session_id] = DES.[session_id]
            CROSS APPLY sys.[dm_exec_sql_text](DEC.[most_recent_sql_handle])

                                                                       DEST ;

------------------------------------------------------------------

Copy Data from One Table to Another Table on same SQL Server Instance

INSERT INTO [NAVDB_2013R2].[dbo].[ComapnyName_ India$Purch_ Comment Line]
           ([Document Type]
           ,[No_]
           ,[Document Line No_]
           ,[Line No_]
           ,[Date]
           ,[Code]
           ,[Comment])
(SELECT 
            [Document Type]
           ,[No_]
           ,[Document Line No_]
           ,[Line No_]
           ,[Date]
           ,[Code]
           ,[Comment]

FROM [NAVDB_2013].[dbo].[ComapnyName_$Purch_ Comment Line])