Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: getting the total of amount in praposals

getting the total of amount in praposals 1 year 6 months ago #22080

  • mythri
  • mythri's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 56
  • Karma: 1
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
The administrator has disabled public write access.

Re:getting the total of amount in praposals 1 year 6 months ago #22082

  • humphrey
  • humphrey's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 169
  • Thank you received: 6
  • Karma: 13
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

File Attachment:

File Name: propal.zip
File Size: 15297


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

Rgds.
The administrator has disabled public write access.

Re:getting the total of amount in praposals 1 year 6 months ago #22083

  • humphrey
  • humphrey's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 169
  • Thank you received: 6
  • Karma: 13
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
The administrator has disabled public write access.

Re:getting the total of amount in praposals 1 year 6 months ago #22084

  • mythri
  • mythri's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 56
  • Karma: 1
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
The administrator has disabled public write access.

Re:getting the total of amount in praposals 1 year 6 months ago #22085

  • humphrey
  • humphrey's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 169
  • Thank you received: 6
  • Karma: 13
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
Last Edit: 1 year 6 months ago by humphrey.
The administrator has disabled public write access.

Re:getting the total of amount in praposals 1 year 6 months ago #22089

  • mythri
  • mythri's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 56
  • Karma: 1
Sorry i didn't mention the version. I am using 3.3 beta version. is it not possible in this? :(
The administrator has disabled public write access.

Re:getting the total of amount in praposals 1 year 6 months ago #22090

  • humphrey
  • humphrey's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 169
  • Thank you received: 6
  • Karma: 13
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.
The administrator has disabled public write access.

Re:getting the total of amount in praposals 1 year 6 months ago #22091

  • humphrey
  • humphrey's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 169
  • Thank you received: 6
  • Karma: 13
@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.
The administrator has disabled public write access.

Re:getting the total of amount in praposals 1 year 6 months ago #22110

  • mythri
  • mythri's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 56
  • Karma: 1
Thank you for the suggestion. Now i am installing 3.2.3. I will replace the propal.php with the one you have given.
Last Edit: 1 year 6 months ago by mythri.
The administrator has disabled public write access.

Re:getting the total of amount in praposals 1 year 6 months ago #22111

  • mythri
  • mythri's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 56
  • Karma: 1
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..
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.081 seconds