Picking project/timesheet items for invoice

View: New views
9 Messages — Rating Filter:   Alert me  

Picking project/timesheet items for invoice

by rstone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've just come back to using pERP after 4 months away. I am on 0.4 and an old problem has crept up again. When I create a new receivable invoice and bring up the pick list of project and timesheet entries, it shows me everything for that customer, including items that have already been invoiced.

I know I've seen this before, and I think Nathan had confirmed that only uninvoiced items should show up.

Any suggestions? Any reason this problem would keep cropping up?

Thanks,

Ron

Re: Picking project/timesheet items for invoice

by Nathan Gray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 7-May-09, at 6:54 AM, rstone wrote:

>
> I've just come back to using pERP after 4 months away. I am on 0.4  
> and an old
> problem has crept up again. When I create a new receivable invoice  
> and bring
> up the pick list of project and timesheet entries, it shows me  
> everything
> for that customer, including items that have already been invoiced.
>
> I know I've seen this before, and I think Nathan had confirmed that  
> only
> uninvoiced items should show up.
>
> Any suggestions?

I am unable to duplicate the problem with timesheet entries.  Here are  
my steps:
1.  Create custom field for TimeSheet called client_id, Type Select  
Entry - Accounts Receivable
2.  Enter two timesheet entries, no category.  5h @ $50, chose client  
0502
3.  AR -> Site Configuration, enable invoicing for TimeSheet, No  
category (2 checkboxes).  GL Acct. 520000.

4.  Create an invoice for client 0502
5.  Add Line From TimeSheet, pick one of two timesheet entries and add  
it
6.  Save & Post invoice

7.  Create another invoice for client 0502
8.  Add Line From TimeSheet, only the second entry is in the list

Any differences between what you did?
I don't have ProjectManager installed, but I can if I need to.


> Any reason this problem would keep cropping up?

We don't use this feature here, so it is not something I even think to  
test.  Even though I don't change the code, it's possible that  
something in TimeSheet or ProjectManager has changed to make it  
incompatible.

nathan at goarctic dot com


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Perp-developers mailing list
Perp-developers@...
https://lists.sourceforge.net/lists/listinfo/perp-developers

Re: Picking project/timesheet items for invoice

by rstone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Nathan,

There are a couple of aspects of the workflow that are different.

First - I always add timesheet entries in the context of a project. From within a project, Add New -> Timesheet entry.
Second - I always add to an invoice by selecting Projects from the drop down.
Third - and this may be my bad, I have gotten out of the habit of selecting a client ID for the individual timesheet entries. Since I have client_id set on each project, pERP finds everything within the project.

I tried adding to an invoice from the Timesheets selection this morning. I got a much shorter list of items (perhaps 8 vs 40+). I did not have time to look at it in detail, but I did notice one item that I confirmed was already invoiced.

Let me know if there is anything I can try (workflow etc) to issolate this. I know I've seen the behavior intermittently in the past.

Many thanks,

Ron

On Thu, May 7, 2009 at 10:52 AM, Nathan Gray <nathan@...> wrote:

On 7-May-09, at 6:54 AM, rstone wrote:


I've just come back to using pERP after 4 months away. I am on 0.4 and an old
problem has crept up again. When I create a new receivable invoice and bring
up the pick list of project and timesheet entries, it shows me everything
for that customer, including items that have already been invoiced.

I know I've seen this before, and I think Nathan had confirmed that only
uninvoiced items should show up.

Any suggestions?

I am unable to duplicate the problem with timesheet entries.  Here are my steps:
1.  Create custom field for TimeSheet called client_id, Type Select Entry - Accounts Receivable
2.  Enter two timesheet entries, no category.  5h @ $50, chose client 0502
3.  AR -> Site Configuration, enable invoicing for TimeSheet, No category (2 checkboxes).  GL Acct. 520000.

4.  Create an invoice for client 0502
5.  Add Line From TimeSheet, pick one of two timesheet entries and add it
6.  Save & Post invoice

7.  Create another invoice for client 0502
8.  Add Line From TimeSheet, only the second entry is in the list

Any differences between what you did?
I don't have ProjectManager installed, but I can if I need to.



Any reason this problem would keep cropping up?

We don't use this feature here, so it is not something I even think to test.  Even though I don't change the code, it's possible that something in TimeSheet or ProjectManager has changed to make it incompatible.

nathan at goarctic dot com



------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Perp-developers mailing list
Perp-developers@...
https://lists.sourceforge.net/lists/listinfo/perp-developers

Re: Picking project/timesheet items for invoice

by Nathan Gray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 7-May-09, at 11:59 AM, Ron Stone wrote:

> Hi Nathan,
>
> There are a couple of aspects of the workflow that are different.
>
> First - I always add timesheet entries in the context of a project.  
> From within a project, Add New -> Timesheet entry.
> Second - I always add to an invoice by selecting Projects from the  
> drop down.

Good to know, that's much different.  I did notice that there is no  
'Our Reference' or details for PM entries, but that shouldn't be  
related.  They're just not specified.

> Third - and this may be my bad, I have gotten out of the habit of  
> selecting a client ID for the individual timesheet entries. Since I  
> have client_id set on each project, pERP finds everything within the  
> project.

This is a step that isn't needed, as long as the project has a client  
ID.

> I tried adding to an invoice from the Timesheets selection this  
> morning. I got a much shorter list of items (perhaps 8 vs 40+). I  
> did not have time to look at it in detail, but I did notice one item  
> that I confirmed was already invoiced.

Same quantity?  If someone changes the quantity after the invoice is  
posted, the entry will show up again.

> Let me know if there is anything I can try (workflow etc) to  
> issolate this. I know I've seen the behavior intermittently in the  
> past.

I was able to get an already invoiced entry to show up again.  By  
partially invoicing the timesheet (2 instead of 5), it still shows up  
as 5.  Could this be related?  If I invoice 5 again, I'll be 2+5, and  
it will always show up until I invoice -2, for a total of 5.
I'll see if I can get it to show the un-invoiced quantity instead.  
Maybe that will help.

Nathan Gray
nathan at goarctic dot com


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Perp-developers mailing list
Perp-developers@...
https://lists.sourceforge.net/lists/listinfo/perp-developers

Re: Picking project/timesheet items for invoice

by rstone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, always the full quantity, unless I somehow overtyped something. I'll double check against invoices. It may be that the problem you described below is unrelated, but I'd be happy to test a solution against the behavior I see.

Ron


I tried adding to an invoice from the Timesheets selection this morning. I got a much shorter list of items (perhaps 8 vs 40+). I did not have time to look at it in detail, but I did notice one item that I confirmed was already invoiced.

Same quantity?  If someone changes the quantity after the invoice is posted, the entry will show up again.


Let me know if there is anything I can try (workflow etc) to issolate this. I know I've seen the behavior intermittently in the past.

I was able to get an already invoiced entry to show up again.  By partially invoicing the timesheet (2 instead of 5), it still shows up as 5.  Could this be related?  If I invoice 5 again, I'll be 2+5, and it will always show up until I invoice -2, for a total of 5.
I'll see if I can get it to show the un-invoiced quantity instead.  Maybe that will help.

Nathan Gray

nathan at goarctic dot com




--
Ron Stone
613 322-1175
Skype: ronstone2000

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Perp-developers mailing list
Perp-developers@...
https://lists.sourceforge.net/lists/listinfo/perp-developers

Re: Picking project/timesheet items for invoice

by Nathan Gray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 7-May-09, at 2:37 PM, Ron Stone wrote:

> Yes, always the full quantity, unless I somehow overtyped something.  
> I'll double check against invoices.

You can try this SQL:
SELECT
egw_pm_elements.pe_title,
SUM(quantity) AS invoiced_quantity,
SUM(egw_pm_elements.pe_used_quantity) AS used_quantity
FROM perp_invoice_line
JOIN egw_pm_elements ON
         perp_invoice_line.invoicable_class =  
'ProjectManagerInvoicable' AND
         perp_invoice_line.invoicable_id = egw_pm_elements.pm_id AND
         perp_invoice_line.invoicable_item_line = egw_pm_elements.pe_id
GROUP BY invoicable_class, invoicable_id, invoicable_item_line
HAVING invoiced_quantity != used_quantity

Anything that shows up was only partially invoiced.

> It may be that the problem you described below is unrelated, but I'd  
> be happy to test a solution against the behavior I see.

You can try SVN r 3460, but if there aren't any partially invoiced  
elements, it won't help.
http://perp.svn.sourceforge.net/viewvc/perp/trunk/perp_ar/inc/class.ProjectManagerInvoicableItem.inc.php?revision=3460&pathrev=3460


Nathan Gray
nathan at goarctic dot com


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Perp-developers mailing list
Perp-developers@...
https://lists.sourceforge.net/lists/listinfo/perp-developers

Re: Picking project/timesheet items for invoice

by rstone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Nathan,

Indeed, I found several timesheet items that were off. The way these happened is that the timesheets were recorded, and then additional  work added to the activities. When invoicing, I neglected to change the timesheets, instead making the changes to the invoices directly. So the timesheets were under, not over the invoices. I went through these items and corrected the hours. The SQL no longer finds imballances, but the items still show up in the pick list when creating new invoices. Also, there are other timesheet entries that have been invoiced, were not imballanced, and still show up in the pick list.

Not sure how much that helps. Let me know if there is anything else I can try to help track this down.

Many thanks,

Ron

On Thu, May 7, 2009 at 5:03 PM, Nathan Gray <nathan@...> wrote:

On 7-May-09, at 2:37 PM, Ron Stone wrote:

Yes, always the full quantity, unless I somehow overtyped something. I'll double check against invoices.

You can try this SQL:
SELECT
egw_pm_elements.pe_title,
SUM(quantity) AS invoiced_quantity,
SUM(egw_pm_elements.pe_used_quantity) AS used_quantity
FROM perp_invoice_line
JOIN egw_pm_elements ON
       perp_invoice_line.invoicable_class = 'ProjectManagerInvoicable' AND
       perp_invoice_line.invoicable_id = egw_pm_elements.pm_id AND
       perp_invoice_line.invoicable_item_line = egw_pm_elements.pe_id
GROUP BY invoicable_class, invoicable_id, invoicable_item_line
HAVING invoiced_quantity != used_quantity

Anything that shows up was only partially invoiced.


It may be that the problem you described below is unrelated, but I'd be happy to test a solution against the behavior I see.

You can try SVN r 3460, but if there aren't any partially invoiced elements, it won't help.
http://perp.svn.sourceforge.net/viewvc/perp/trunk/perp_ar/inc/class.ProjectManagerInvoicableItem.inc.php?revision=3460&pathrev=3460



Nathan Gray
nathan at goarctic dot com




--
Ron Stone
613 322-1175
Skype: ronstone2000

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Perp-developers mailing list
Perp-developers@...
https://lists.sourceforge.net/lists/listinfo/perp-developers

Re: Picking project/timesheet items for invoice

by Nathan Gray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 8-May-09, at 11:10 AM, Ron Stone wrote:

> Not sure how much that helps. Let me know if there is anything else  
> I can try to help track this down.


The only reason that already invoiced items would show up is if for  
some reason they don't seem to be invoiced.
You can try adding:
echo "Invoiced? Quantity: $quantity Invoiced: " . $this-
 >get_quantity_invoiced() . '<br />'
after class.ProjectManagerInvoicableItem, line 106
and do the search again.  You're looking for lines where Quantity:  
doesn't match Invoiced.

I'm running out of ideas again.

You can try adding:
_debug_array($invoicable);
after class.ProjectManagerInvoicable.inc.php, line 124
and do the search again.

You can also try selecting a particular project in the search, see if  
that changes things.

Nathan Gray
nathan at goarctic dot com


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Perp-developers mailing list
Perp-developers@...
https://lists.sourceforge.net/lists/listinfo/perp-developers

Parent Message unknown Re: Picking project/timesheet items for invoice

by Nathan Gray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 13-May-09, at 3:39 PM, Ron Stone wrote:

> Your line count is a bit different from mine (my version is a couple  
> of months old). I tacked the lines below onto the ends of  
> get_invoice_quantity() and get_description() respectively. I reran  
> the SQL query - nothing comes up. Let me know if I inserted these in  
> the wrong places.

Wrong places; putting them on the end won't help much, as they won't  
ever be run.


> Is there any manual eye-balling (comparison) of tables I could do  
> for a timesheet entry that is showing up and should not be?

Have a look at egw_pm_elements.pe_used_quantity, which is the quantity  
used for projectmanager elements, and compare that against your  
timesheet entries.  Maybe the difference is there?

Nathan Gray
nathan at goarctic dot com


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Perp-developers mailing list
Perp-developers@...
https://lists.sourceforge.net/lists/listinfo/perp-developers