New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoices export settings #1224

Lagneaux opened this Issue Jul 7, 2018 · 3 comments


None yet
2 participants

Lagneaux commented Jul 7, 2018

Expected behaviour


This comment has been minimized.

Lagneaux commented Jul 7, 2018


Request for improvement to print invoices (odt / ods) :

- Due date in days or months :
• due date +1 to 30 days ([var.dueDateD;frm='dd mm yyyy'])
• due date + 1 to # monthes) ( [var.dueDateM;frm='dd mm yyyy'])

- Incremented counter, number of digits for a invoice numbering
• eg: 5 numbers » 00001 to 99999
May be : departure of the numbering

- [var.invoiceID] choice of the format of the identification of an invoice
• customer-date : customer-yyymmdd ([var.invoiceID-1]
• customer-date-counter : customer-yyymmdd.00001 ([var.invoiceID-2]
• date-counter : yyyymmdd.00001 ([var.invoiceID-3]
• counter : 00001 to 99999 ([var.invoiceID-4]

Rate negotiate with the customer and fill in the parameters of the customer's sheet which is used to calculate the amounts

Somebody will be able to help me to change the print.php ?
variables could be set directly by editing the print.php file.
Would still remain or maybe the problem of incrementing the invoice numbers (database?)



This comment has been minimized.

acmeraptor commented Jul 7, 2018


This comment has been minimized.

Lagneaux commented Jul 9, 2018


I'm not a php programmer but I did some lines that allow me to have a counter!

I make my work available to everyone! The print file slightly m
odified and a «record of time» (list, time, time rate, VAT, totals with and without VAT).

How to recover for these documents invoices, the variable of the name of the publisher (connected or other)?

// billing counter,read
$fp = fopen("fnum.txt","r+");                          // 1.Open file r&w (chmod 777)
$fnum = fgets($fp);                                    // 2.Read last number in line 1
$fnumerotation = str_pad($fnum, 5, "0", STR_PAD_LEFT); // 3.Insert as many zero to have 5 digits, for example : 00009 or 00

$invoiceID = $customer['name'] . "." . date("Y", $out) . date("m", $out) . date("d", $out) . "." . $fnumerotation;
$today = time();
$dueDate = mktime(0, 0, 0, date("d"), date("m") + 1, date("Y"));

// billing counter, increment and save
$fnum++;                                              // 3.Increment the number (+1)
fseek($fp,0);                                         // 4.We go to the beginning of line 1 of the file
fputs($fp,$fnum);                                     // 5.Write in the file the new number
fclose($fp);                                          // 6.Close the file


Relevé de Temps.docx
php file, print
Counter file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment