getting the total of amount in praposals

Hi,

When i list the proposals through left menu in commercials, i just get the list but also i want to get the total amount of the listed proposals. It should give the total as the status selected like signed, unsigned, opened… .

I am not getting how to do it. Can somebody help me in this. Please

Hi,

I’m definitely not a software developer but I like to play with PHP… as I faced the same issue so I did some modifications to display:

. sub total: total of the current page
. grand total: total for all pages

so if you get only one page of result sub total = grand total

You need to replace the file …/comm/propal.php by the one from the zip file

propal.zip (14.9 KB)

I did this on a 3.2.3 version (assuming ok for 3.2.0 to 3.2.4)

Rgds.

Just thinking… SUB TOTAL and GRAND TOTAL words are hard coded as we only use English interface… but give it a try and if you like it so I think it should not be so difficult to add translations, let me know then I’ll modify the file if necessary.

Enjoy your day

Hi,

Thanks a lot for this.

But when i list the proposals, i mean in comm/propal/list.php (commercial proposals->list in left menu) i should get the total amount of proposals and It should give the total as the status selected like signed, unsigned, opened…, like in propal.php can we do it in comm/propal/list.php?

Thank you very much for the help

Which dolibarr version are you using ?

…/comm/propal/list.php just doesn’t exist in 3.2

So perhaps you’re using an old version and you should better upgrade to the 3.2.4 which anyway embed many bug fixes.

The file I posted above is what you ask for… but you need to get at least dolibarr 3.2

Rgds

Sorry i didn’t mention the version. I am using 3.3 beta version. is it not possible in this? :unhappy:

Oohh OK I see !

3.3 is still a little far from being stable, a RC will be released soon and will for sure get many fixes done before to go to a stable version… Frankly speaking it’s a bad idea to use it in a production environment until it goes to ‘stable’ status.

Anyway I assume it is possible to make the modification for 3.3 and I’ll see that once it will be stable 3.3.0 or even 3.3.1 (will have more certitude that the file you refer to will be debugged first).

Rgds.

@Eldy if you read this post…

I remember previous topics about such a subject to display total amount at the bottom of the page list, getting a little in the code so I understood the problem due to the limitation of lines per pages…

Anyway if you check and compare my file posted above with the regular one from 3.2.3 so you’ll quickly understand my idea to achieve this in a simple way, maybe you could embed this solution in the 3.3 (and even make it better… please don’t laugh at my code… ha ha)

Rgds.

Thank you for the suggestion. Now i am installing 3.2.3. I will replace the propal.php with the one you have given.

I have installed it and also replaced the propal.php too. Its working fine. But for both grand total and sub total same amount is getting displayed. what is the use of sub total…

Hello,

OK… so:

. sub total is the total amount of the page currently displayed
. grand total is the total amount of all of the propal fitting the criteria

So if you have only one page of result: sub total = grand total

So I assume you don’t have so many propal and they are all displayed in one page (25 lines per pages is the standard limit unless you changed it).

Let me know… If there is a bug I’ll see whether I can fix it !!!

Rgds.

Yeah! i got it. Thank you.

Is it possible to get the total for customer orders? (commande/liste.php), when we list it its not even showing the amounts for each order. So can you please tell me how to do it?