473,804 Members | 3,108 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatic Billing

Hi,

I am creating a Web hosting billing program and require a script which
will output the date next month, obviously this can be difficult due to
different numbers of days in different months. It needs to be able to
differ between monthly payments, quarterly and also yearly.

Any tips?

Rob

Jul 31 '05 #1
1 1527
"Dream Web Host" <ro**********@b lueyonder.co.uk > kirjoitti
viestissä:11*** *************** ****@g49g2000cw a.googlegroups. com...
Hi,

I am creating a Web hosting billing program and require a script which
will output the date next month, obviously this can be difficult due to
different numbers of days in different months. It needs to be able to
differ between monthly payments, quarterly and also yearly.

Any tips?

Don't know exactly what you are looking for, but one thing is sure, if you
can't handle it with date(), mktime() and strtime(), your thinking too
complicated.

Different number of days in month is no problem, you can get the number of
days in february for example with
$february_first = mktime(0,0,0, 2,1,2005); // Creating a timestamp for
february 1st 2005.
date('t', $february_first ); // the t parameter gives the number of days.

With mktime(0,0,0, $month,1,2005) you can create timestamps for billingdates
for each first of the month by altering the value of $month.

With strtotime() you can advance by days, months. I'm not sure if years, but
12 months should do it. Okay, you have billing date, and you need the next,
that's easy. Is it 1 month, 3 months or 12 months?

$next_billing_d ate = strtotime("+$mo nths months", $current_billin g_date);
//Where $months is either 1, 3 (as in a quarter) or 12 for entire year.

You should get started with those. Feel free to explain your problem further
to get a proper answer. :)

--
SETI @ Home - Donate your cpu's idle time to science.
Further reading at <http://setiweb.ssl.ber keley.edu/>

Soulman <et************ ****@5P4Mgmail. com>
Jul 31 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
13004
by: Scott | last post by:
Not sure if this is the right place to post this or not, but I am in the process of trying to find a Web Hosting/Isp Billing system that is reasonable in price and uses Access or SQL Server for a backend DB. I have found a couple that seem to do what I want, but are using FILEMAKER for their DB. Looking for something that will handle reoccuring billing as well as per project billing. Keeping up with client info, etc.... Also needs to...
0
1531
by: Stuart Burgess | last post by:
Has anyone ever installed Tarbas VoIP billing software on Red Hat with mysql? I am having problems of the most basic kind and could use a few pointers Stu
1
2378
by: ML | last post by:
hello i need to write an sql which calculates # of billing cycles for an order for which ive order start and end date. the first invoice will be cut on the order start date. Also if i apply a coupon for lets say one month (30 days) to that order i need to calculate how many billing cycles that coupon will apply to. ive start and end date of coupon ina diff table for that order for eg: if an order was started on 1/15 and ended on 4/14...
18
12817
by: Jeremy Weiss | last post by:
I'm trying to build a database that will handle the monthly billing needs of a small company. I'm charting everything out and here's what I see: table for customers sub table to track payments received. No biggie, right? Well, here's my problem. I don't know how to tell access to modify everyone's account balance each month. And I can't just always assume that their monthly bill is $16 just because their balance is $16. If I do that...
1
1303
by: KavvY | last post by:
Hi, Considering the code posted below can anyone explain to me why the following behaviour occurs? On page load the testFillDataGrid() function gets called and the variable sel is successfully set to reference an instance of SqlSelect. The rest of the code displays a DataGrid using a DataView and the source sorted by the criteria specified in the sortString.
0
1440
by: job kazan | last post by:
Can anyone suggest the best and easiest platform for the following job, possible freelancer and approximate budget for this: "It must be a script that has as an input a long code from the "calling scratch card" that customers enters on our website. Script accepts the long code, validates it with a database, than offers a customer to create a login/pass to enter
2
2608
by: ceeyespee | last post by:
I have developed a billing software for pharmacy. The bills are printed using dot matrix printer(LQ1070+) on 4 inch width continous paper roll as the list of items sold vary from bill to bill. Now the problem. Printer.Print command does a beautiful job of printing the bill fully one at a time. But after printing the bill it ejects a foot long paper. Is it a problem with the printer and is there codes available to stop the ejection after...
3
1027
by: chetuashish | last post by:
Hi, I have a ASPX file that done some billing implementation. Now i want to add this file in Automatic scheduler so that this file will run every day automatically. Please suggest me the way how to do that........... Thanks
3
4656
by: myjish18 | last post by:
Hello, We have a DB2 UDB database v8.2.7 (db2 v8.2 fixpak 14) on AIX 5.3 which has Automatic Storage (AS) enabled. We want to disable automatic storage on entire database and/or disable automatic storage on all tablespaces. DB2 Manual says it once AS is enabled, it cant be changed. Is there any way to disable the AS or any other alternative? Please advice.
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9575
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10564
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10320
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10308
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9134
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6846
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5513
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2981
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.