Quantcast
Channel: Dolibarr Forum :: Topics in Category: Creation of a New Module
Viewing all articles
Browse latest Browse all 440

Project based numbering module - by: e.chionetti

$
0
0
Not exactly.

Let's say we have a project with number 16_093 and then we have two client orders related to this project.
I would like to have them numberd 16_093-ORD-001 and 16_093-ORD-002

Then I have another project 16_114. It has one related order whose number should be 16_114-ORD-001.

In other words the last number should reset at each project. Anyway I should be able to solve this reset in my custom numbering module, or I could even accept the index to be reset each year.

How to get {PPP} is exactly my main problem. Each order is linked to a project so what I'm trying to do is getting the project number inside my custom numbering module.
I see that the llx_commande table contains the fk_projet field but I'm in trouble in getting it inside my getNextValue() function.

Many thanks for your help.

Viewing all articles
Browse latest Browse all 440

Trending Articles