Reports from Bills and sale table by using DateEntry to get day wise sale report with total value

preview_player
Показать описание
These tables have date column so we have to take a fresh data to get details reports on todays or previous days sell. While displaying the sale of the user selected date, we can show the total value of the sale.
WE will be using treeview to display the sell report showing the product id , price ,quantity, bill number and bill date.
Here on selection of date from the DateEntry widget the trace method will trigger the function to collect the data from MySQL table and populate the children of the Treeview.
The query to get the data is from sell table is here.
SELECT * FROM plus2_sell WHERE bill_date=%s
Here we have used the placeholder and then passed the user selected date as parameter to MySQL table to retrieve the record set.

strftime : Returns the string by using format by taking date object as input
All source codes here
All about DateEntry widget is here

MySQL database connection using SQLAlchemy and error library
Treeview copy
Product table Create Query

All parts of Restaurant Management are here

Part I is here

Part II : database integration

Part III : Generating Invoice

Part IV Installation of product table

Part V Installation of sale and bill tables

Part VI Generating date wise reports

Part VII Using Combobox for selection of items.

Part VIII Select and edit Product table using treeview

#ReportonDailySell #DailySale #Tkinter #plus2net #python #ReportOfdate #DateReport
Рекомендации по теме
Комментарии
Автор

Thank you very much sir, i have successfully changed the date format now its retrieving the data according to my bill date format like. 26-02-2022. and its again credit goes to you.

ali-mwnf
Автор

Wow. I am really learning alot from your tutorials, kindly make a tutorial like this to generate monthly sales report. When you select a month, all the sales in that month will be displayed.
Thanks

yeirivercounty
Автор

Mostly for the report part. I would like to study it and learn more from it. Thanks

yeirivercounty
Автор

Thank you very much for reply and video link. i will try it. unfortunately i started to watch your videos 1 week ago but these are very help full. and sir i am the beginner and i never joined any institute. i am trying to learn through youtube. and trying to create a desktop software for general store and i have executed so many modules of python and can generate the bill
but sir i am using ".txt" file formate for print and always face alignment problem in the txt saved file for printing. and sir i m using sqllite3 data base. but you use mysql so i had to spent 2days to execute your this sales report project. thank you very much once again for the help

ali-mwnf
Автор

Sir discuss accept returns from customer method

SwatcomComputers
Автор

Sir is there any option in tkcalender entry box to change the date format? because this entry is picking only the date format like 2/2/22 and mostly billing software shows format like this 02-02-2022 and is date format is saved in our treeview data base as a bill date while generating the bill. so tkcalender entry is not able to retrieve data in this format

ali-mwnf
Автор

Sir yesterday i studied the video link that u sent me regarding range date FROM 03-02-2021 TO 02-02-2022
but sir as far as i understood it depends sql query and this query will be fixed either for 1year, 1month, or any fixed week. sir i was looking for tow calenders entry in the 1st calender entry we would put and in the 2nd calender entry we would put another date. so it would show the result between the range. no mater we put weeks, months or year. and we would not need to change the query again and again.

ali-mwnf
Автор

from datetime import i have imported it at the top. still 2.tkcalender entry not working. anyway leave.

ali-mwnf
Автор

Thank you very very much sir for such helpfull video. i did it successfully. but sir i have 2.problems
1- sir can we get sell of one week? for example FROM 3/2/22 TO 9/2/22
2nd problem is how can we get print out of our sale report from the treeview ?
it will be so kind of you if u give me some solution.... thanks once again for responding me in past.

ali-mwnf
Автор

Sir i tried to create 2.tkcalender entry to get sales report of between any month and any year but sir facing may errors and issued in sqlite query as well as in def.function. please help me if posible. it will be so kind of you.

ali-mwnf
Автор

No I am asking to set the expiry validation for the python software. suppose if we convert python gui file into '.exe' file and we give it to the customer as a software, so this software should work for 6months only and after 6 months, the customer should call us to renew the software. so do we need to set expire date in dashbord or main file only or we have to set it in all python files? sir if the code is simple so plz send me i will be thankfull to you.

ali-mwnf
Автор

Nice teaching.
Sir how can we set expiry date in python tkinter gui form or software?

ali-mwnf
Автор

Sir, i watched your video (Tkinter Autocomplete options using sources All 3parts) its amazing, i successfully done it. but sir i am getting error when i am trying to deal with 2 columns of sqllite.3 database and 2 entry box sir i have tow entry fill 1st.productname and 2nd.rate. similarly i have tow columns in database. i want to search by productName so data of both product name and its Rate should be displayed in list box and as i select and press enter it should be displayed in entry box. sir here is my sqllite.3 query
conn =
c = conn.cursor()
c.execute('SELECT * FROM product_list')
data = c.fetchall()
conn.close()
print(data)
self.my_list=[r for r, in data]
print(self.my_list)
and error is
self.my_list=[r for r, in data]
ValueError: too many values to unpack (expected 1)

i tried to pack and unpack by using * but failed.
do i need to make changing in def.functions? sir you always helped me i hope you can resolve my issue

ali-mwnf
Автор

Sir can we keep a item name combo box and qty input next to it instead of keeping seperate box for each item in billing window. Please help.

mohammedadnana
Автор

Please sir. Send me the source code of this work

yeirivercounty
Автор

Thanks sir, i have tried but i received error saying 'Could not process parameters: str(2022-07-25), it must be of type list, tuple or dict'
Can you help to spot the error. Thanks for your helpful tutorials.

saidabdihassan
Автор

Sir, i also tried this code...
("SELECT * FROM product_list WHERE bill_date Like '%" + self.var_calender_1.get() + "%' BETWEEN '%" + self.var_calender_2.get() + "%'")
The error is
dt2 = dt.strftime("%d-%B-%Y")
AttributeError: 'datetime.timedelta' object has no attribute 'strftime'

ali-mwnf