Invoicing from projectmanager doesn't work

classic Classic list List threaded Threaded
11 messages Options
ernie.p ernie.p
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Invoicing from projectmanager doesn't work

Hi,

I'm sure I've overlooked something, but I cannot find out

I have a small company that only sells services. No goods or anything else. During my search for an integrated solution with egroupware and ERP I came upon projectERP. After downloading the latest official release and trying out some things I found that invoicing from projectmanager does not work. So I downloaded the svn version. A lot of things went better for me with that version, however I still can't get the invoicing from PM working. I think I setup the client_id as desired, but every time I try to add a line from PM, I get this error:

Database error

Invalid SQL: SELECT SQL_CALC_FOUND_ROWS DISTINCT egw_pm_projects.*,pm_extra_value AS client_id,role_acl,egw_pm_projects.pm_id AS pm_id FROM egw_pm_projects LEFT JOIN egw_pm_members ON (egw_pm_projects.pm_id=egw_pm_members.pm_id AND member_uid=5)  LEFT JOIN egw_pm_roles ON egw_pm_members.role_id=egw_pm_roles.role_id WHERE pm_status='active' AND (pm_access='anonym' OR pm_access='public' AND pm_creator IN (5,7) OR pm_access='private' AND pm_creator IN (5,7) OR egw_pm_roles.role_acl!=0) AND (cat_id IN (0,16,17)):
Unknown column 'pm_extra_value' in 'field list'

If I can get this working I think you have me onboard! After that I will probably start with translating to Dutch.

Some release info:
egroupware 1.8.001 (no svn)
projecterp svn 4337
mysql 5.0.77

Thanks for your help in advance!

Ernie

Nathan Gray Nathan Gray
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Invoicing from projectmanager doesn't work

On Mon, Jan 31, 2011 at 2:13 PM, ernie.p <[hidden email]> wrote:
>
> I'm sure I've overlooked something, but I cannot find out

That's definitely bad SQL (it's missing the custom field join), but I
am unable to duplicate it.

Did you go through this?
http://www.projecterp.org/mediawiki/index.php/Invoicing_ProjectManager


Nathan

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
ernie.p ernie.p
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Invoicing from projectmanager doesn't work

Hi Nathan,

Thank you for your response.

Yes, I did follow the steps described in the link, so I believe I've setup everything ok. This JOIN stuff is that something that goes wrong in egroupware itself or in the perp part? I have some basic programming skills, so I can try to find out where to correct if I know what to look for (provided this is some programming error of course....).

Ernie.
Nathan Gray Nathan Gray
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Invoicing from projectmanager doesn't work

On Wed, Feb 2, 2011 at 3:45 AM, ernie.p <[hidden email]> wrote:

>
> Hi Nathan,
>
> Thank you for your response.
>
> Yes, I did follow the steps described in the link, so I believe I've setup
> everything ok. This JOIN stuff is that something that goes wrong in
> egroupware itself or in the perp part? I have some basic programming skills,
> so I can try to find out where to correct if I know what to look for
> (provided this is some programming error of course....).

I'm not sure exactly where the fault lies, but please trace it
through, see if you can figure it out.
perp_ar/ProjectManagerInvoicable calls projectmanager_bo->search(),
which is passed all the way through to
etemplate/inc/class.so_sql_cf.inc.php.
It's probably a missing parameter or something, projectmanager was
recently changed to use so_sql_cf.

Thanks,
Nathan

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
iiasunshine iiasunshine
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Invoicing from projectmanager doesn't work

Hi,
I have the same problem, invoicing the project. I believe the right querry it should be:
SELECT SQL_CALC_FOUND_ROWS DISTINCT egw_pm_projects.*,pm_extra_value AS client_id,role_acl,egw_pm_projects.pm_id AS pm_id FROM egw_pm_projects LEFT JOIN egw_pm_members ON (egw_pm_projects.pm_id=egw_pm_members.pm_id AND member_uid=8)  LEFT JOIN egw_pm_roles ON egw_pm_members.role_id=egw_pm_roles.role_id LEFT JOIN egw_pm_extra ON egw_pm_projects.pm_id=egw_pm_extra.pm_id WHERE pm_status='active' AND (pm_access='anonym' OR pm_access='public' AND pm_creator IN (15,8) OR pm_access='private' AND pm_creator IN (15,8) OR egw_pm_roles.role_acl!=0) AND (cat_id IN (0));

I've added "LEFT JOIN egw_pm_extra ON egw_pm_projects.pm_id=egw_pm_extra.pm_id"

I also saw that in my tables cat_id is null and not zero.

Now I have to figure out how to change it in php files.

Best Regards,
iiasunshine
iiasunshine iiasunshine
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Invoicing from projectmanager doesn't work

Hi again!
I checked the source and I saw that there is a variable build in construct function: $this->extra_join.

I've added the next line in class.projectmanager_so.inc.php in function search():
 $join .= $this->extra_join;
after the line:
$join = $this->acl_join;

I have a valid SQL querry but still have problems with cat_id that is null and not zero.

Best,
iiasunshine
ernie.p ernie.p
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Invoicing from projectmanager doesn't work

Hi iiasunshine,

Thank you for finding this so far. I added the $join as you indicated and indeed the error disappeared. Now I get a selection window, however without anything to choose from. I copy/pasted the sql command into a direct sql session (good old webmin :-)) and there I get 2 results, the 2 records that are connected to my test project. Apparantly somewhere in the program logic it is decided that these are not records of the right format. Which brings me to: what actually should pop up in the window? It seems something else then a subproject or an infotask...

Meanwhile I'm having troubles settings up the environment in my debugger, so not too much I can check myself for the moment.

Rgds,
Ernie.
ernie.p ernie.p
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Invoicing from projectmanager doesn't work

I'm still strugling with invoicing from projectmanager. Like I mentioned in my previous post, I no longer get an error message, but a popup with just the headers (no project manager lines). Can someone give me a hint what is going wrong?

Thanks!
Ernie
Nathan Gray Nathan Gray
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Invoicing from projectmanager doesn't work

On Wed, Jul 27, 2011 at 3:12 AM, ernie.p <[hidden email]> wrote:
> I'm still strugling with invoicing from projectmanager. Like I mentioned in
> my previous post, I no longer get an error message, but a popup with just
> the headers (no project manager lines). Can someone give me a hint what is
> going wrong?

You'll have to step through
perp_ar/inc/class.ProjectManagerInvoicable.inc.php to see where it
drops out.
In particular, look in the search() function.  Add
echo __LINE__;
 _debug_array($projects) [or _debug_array($elements);]
after every call to another search() inside.  So, for example, check
after line 54 and 93 to see if it found any matching projects.  If
there's no results for one of those, we can look further there.

Nathan

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
ernie.p ernie.p
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Invoicing from projectmanager doesn't work

It's always funny (or not?) that when you have a problem, the answer is right in front of you. Actually it was already working perfect after changing the code in the project manager. It was just due to my lack of knowledge on how eGroupware and pERP are working, that I ran into problems.

It appeared that I had not created price-lists in the project-manager. After I did so, I could import them on invoices without problems. It was thanks to your suggestion that I looked into the code of pERP and finding the hint towards the price-lists.

Anyway, it's working now. Many thanks for your support!

Rgrds, Ernie.
Nathan Gray Nathan Gray
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Invoicing from projectmanager doesn't work

On Wed, Aug 3, 2011 at 5:26 AM, ernie.p <[hidden email]> wrote:

> It's always funny (or not?) that when you have a problem, the answer is right
> in front of you. Actually it was already working perfect after changing the
> code in the project manager. It was just due to my lack of knowledge on how
> eGroupware and pERP are working, that I ran into problems.
>
> It appeared that I had not created price-lists in the project-manager. After
> I did so, I could import them on invoices without problems. It was thanks to
> your suggestion that I looked into the code of pERP and finding the hint
> towards the price-lists.
>
> Anyway, it's working now. Many thanks for your support!

No worries, glad it's working for you.
I didn't know that price-lists were needed either, so now we all know.

Nathan.

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
Loading...