0% found this document useful (0 votes)
22 views

How To Generate Month End Report

This document provides instructions for generating a month end report. It includes 3 steps: 1) Format the report template, 2) Run a query to get outlet-level invoice and return data, and 3) Run another query to get total invoices and net amount for the month. The queries extract data from tables in a database for the given date range to populate the report template.

Uploaded by

djahan
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

How To Generate Month End Report

This document provides instructions for generating a month end report. It includes 3 steps: 1) Format the report template, 2) Run a query to get outlet-level invoice and return data, and 3) Run another query to get total invoices and net amount for the month. The queries extract data from tables in a database for the given date range to populate the report template.

Uploaded by

djahan
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

How to generate month end report?

1. Format
3elive outlet
outle amoun amoun
t t numInvoice amntReturn numReturn numInvoice t invoiceReturn netReturn

2. Run this follwing query


-----3elive invoice
SELECT lm.bob_location_externalid,SUM(IH.BOB_NETAMOUNT),count(distinct
BOB_POS_EXTERNALID)
FROM BOB_POS_INVOICE_HEADER IH,bob_location_master lm
WHERE CONVERT(VARCHAR,IH.BOB_POS_REFID)
+':'+CONVERT(VARCHAR,IH.BOB_POS_EXTERNALID)
IN
(
SELECT CONVERT(VARCHAR,BOB_POS_REFID)
+':'+CONVERT(VARCHAR,BOB_POS_EXTERNALID)
FROM BOB_POS_INVOICE_DETAILS id
WHERE CONVERT(VARCHAR,IH.BOB_TRANSACTION_DATE_TIME,112)
BETWEEN '20100801' AND '20100831'
and id.BOB_LOCATIONID = lm.BOB_LOCATIONID
)

group by lm.bob_location_externalid
order by 1

3. Run this follwing query

select count(* )as total_inv , sum(bob_netamount)as netAmount from


[C006bos].shwapno.dbo.BOB_POS_INVOICE_HEADER
where convert(varchar,bob_pos_datetime ,112) between '20100801' and
'20100831'

You might also like