0

Hi, I am working on a Inventory management system. No I would like to have a custom bill no, which will be changed on each month, i.e. the first bill of March, 2011 will have a no like "Mar/2011/01", the next will be "Mar/2011/02" and so on, until it is March, 2011. On April 2011 it will start again from one, as "Apr/2011/01"..... and so on. I am using Mysql & PHP for the project. How to achieve this???

4
Contributors
6
Replies
9
Views
6 Years
Discussion Span
Last Post by anirban1087
0

if you want to have your inventory items update the bill number each month, you can use Cron jobs to have it auto update or windows scheduler for windows

0

whenever your are going to generate a bill then use this function to get current date:

echo Date('M/Y/d');

and save this in your database.

0
echo Date('M/Y/d');

will print the current date. But I need a no like Current Month/Year/01. The underline part will increment as I create a new bill. It will not change by day, but by month. At the starting of each month the underline part will start from 1.

0

Thanks to all. I have done this with some changes in my table, and now I am getting the output using some mysql command.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.