Billing questions

Discussion in 'Installation/Configuration' started by krakoukas, Oct 18, 2006.

  1. krakoukas

    krakoukas New Member

    I am looking for billing activation. I will describe here what I first understood on the ISPConfig billing behaviour:

    - Billing takes place for each Web Site
    - Each product must be defined in ISP Billing menu (the billing period field is in month)
    - Traffic and Web default product are already placed for web site
    - Once a web site is created, you must add new products to it to activate billing for the coresponding client.

    What I don't know yet:
    - Is there a batch billing processing, for automatically create invoices?
    - is there remoting API to attach a product to a web site?
    - Where the data is strored in database to manually generate alerts on product end time?

    Thanks for you help
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, its in the upper menu of the billing module, the icon with the coins / money ;)

    Not yet.

    the invoices are stored In the isp_fakt_rechnung table, the product records are stored in the table isp_fakt_rechnung.

    Some translations:

    erste_abrechnung is the timestamp of the creation of the product.
    letzte_abrechnung is the timestamp of the last time a invoice has been created for this product.
    anzahl means number.
  3. krakoukas

    krakoukas New Member

    Do you think I could add it to the remoting API (if you show me where and how)?
    Or may I would to do it directly in SQL adding a record in isp_fakt_record table?

    So if I check in the isp_fakt_record for expired timestamps (for one year product prepayed), I will have my alerts?

    For the billing tables, you mean:
    isp_fakt_artikel: contains the list of all available products.
    isp_fakt_rechnung: contains all the invoices generated by pressing the generate invoice button
    isp_fakt_record: contains all the products subscribed by a web site.
    isp_fakt_node and isp_fakt_dep: I didn't understood their use yet...

    In fact, I erased all the data in isp_fakt_rechnung and I cannot generate the lost invoices again. There must be a flag somewhere that says that the invoices are already generated?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You may try to add them directly to SQL, the invoicing system is not yet part of the remoting framework.

    If i remember correctly, the timestamps are not the expiration date, they are the date when the last invoice has been created. You will have to add the seconds of 1 year to get the expiration timestamp.


    The contain the dependencies and permissions for the isp_fakt_artikel table.


    No. You will have empty or lower the invoice creation timestamp in the isp_fakt_record table.
  5. smartcall

    smartcall ISPConfig Developer ISPConfig Developer


    I have a few additional questions:

    1. What is the field 'status' in isp_fakt_record reffering to? Could I use this field to mark the invoice as paid, if I set the default value to 0. Or it is for something else?
    2. How do I turn those numbers in letzte_abrechnung to date?

    Basically what I want to do is:
    1. I have a test hosting plan that is for 6 months. I want to make a product that is billed monthly and when there are 6 invoices for a client for the last 6 months I want to suspend the site. Like the script that suspends sites on traffic exceedence.

    2. And for the regular hosting plans I need a field where I will mark the invoice as paid, because I want to make a script that suspend sites which haven't been paid 15 days after last invoice.

    Thanks a lot.

    PS. And when I have the working solution I will post it in the forum.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    1) No. There is no field to mark a invoice as paid in the database.
    2) It is a linux timestamp. You may convert it e.g. with the PHP date function to a human readable format.
  7. smartcall

    smartcall ISPConfig Developer ISPConfig Developer


    Call me stupid, but I've been struggling whole day to find out the relation between isp_fakt_rechnung and isp_fakt_record. And I can't find one.

    I suppose that isp_nodes and isp_dep as well as isp_isp_kunde are involved, but can't manage to find out.
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    isp_fakt_rechnung and isp_fact_record have no direct relation.

    isp_fact_record has a relation to isp_isp_web trough the web_id which is the doc_id of the website. Every website is owned by just one client. Every client has a record in isp_isp_kunde and isp_fakt_rechnung has a column kunde_id which is the doc_id of the isp_isp_kunde record.

    Have a look in the following file to see how the invoices in isp_fakt_rechnung are created:


Share This Page