Chris, Thanks for the thought. Zero would work OK for me. The amount in the invoice is the amount the customer is being charged and you may want to show non billable hours on an invoice. As a general principal I don't like showing alpha characters in numeric fields.
What I would like to do, if I do anything at all, is add to the feature in the MyTime page that creates a time sheet for a week. I would like it to also create standard M-F / 9 to5 Time Entries. Then the user would not have to select and populate all the date fields. It would also streamline data entry if on the creation of a time sheet the user could select a Purpose or Scope or some attribute to limit the choice of Work Effort Id's in a drop down control. This would make an end run around using the Pop up work effort filter, which you don't want to present to your average user. The last thing would be a couple of reports. One for the user and another for management that aggregates Worker / Time / Work Effort. Tom ----- Original Message ---- From: Chris Howe <[EMAIL PROTECTED]> To: [email protected] Sent: Saturday, March 24, 2007 10:40:52 AM Subject: Re: Invoice PDF Error Since you're not addressing cost in your scenario, I would imagine you would want to leave the underlying data as null if your time sheet isn't addressing rate. When printing to pdf or to html, you probably want handle it as "N/A", "-", or check if the variable has content before printing, or something similar. The reason for this is that if you ever did address cost, your calculations would be incorrect for assuming a value of 0. --- Tom Burns <[EMAIL PROTECTED]> wrote: > Ray, > > A little additional testing revealed that the Invoice PDF generation > will fail if the Amount value in a line item is empty (it will > succeed if the amount is '0'). > > The business scenario that led to the error was the use the > Workeffort Timesheet feature as a reporting tool to track a workers > time on a task. If a rate is not assigned to the worker in the Party > module then the amount is empty in the Invoice. > > In this case an attempt was made to use the Invoice as a report on a > workers hours and there was no interest in cost or billing. > > > If this is perceived as a defect there are several places in the code > where it could be addressed: > At the Party level have a default value of 0 for Party Rate > At Invoice creation in Edit Time-sheet default the invoice line item > amount to 0 > At PDF creation default the invoice line item amount to 0 > Alert the user to empty amounts, prompt for an amount or cancel the > operation > All of the above > Any thoughts? > > Tom > > ----- Original Message ---- > From: Tom Burns <[EMAIL PROTECTED]> > To: [email protected] > Sent: Friday, March 23, 2007 9:38:36 PM > Subject: Re: Invoice PDF Error > > > Ray, > > The code I am working with is a fresh compile "svn update / ant > clean-all / ant" as of today. The problem is manifest on two systems > that are independent of one another, a desktop and notebook. > > The common element is that the invoices were created in the work > effort module from time-sheets. To try to reproduce, create a time > sheet, add an entry, from the time sheet view, enter a Bill From > Party and Bill To Party then select 'Add Work Effort Time To New > Invoice'. > > Select the Accounting Tab > Show All Invoices > Click on the last > invoice in the Invoice Id column. Click the 'PDF' button. Under some > condition the PDF creation will fail (and under others it will > succeed, as I am finding out). It's getting late, I'll do some more > testing in the morning. > > Thanks for taking a look, > > Tom > > > ----- Original Message ---- > From: Ray Barlow <[EMAIL PROTECTED]> > To: [email protected] > Sent: Friday, March 23, 2007 3:39:14 PM > Subject: Re: Invoice PDF Error > > > Tom, > > Is this standard OFBiz code and data? I just did a clean download, > build > and test and the invoice PDF came up OK. > > Maybe you could furnish a few more details like OFBiz version, > platform, > DB and most useful if you can reproduce using the default data what > products did you add to your order? > > Ray > > > Brettonwoods wrote: > > Hi All, > > > > Got this error when trying to create a PDF file for an Invoice. > > Target exception:... is repeated four times in the actual error, > seems like > > it's failing on some iteration but I can't nail it down. > > > > Thanks for any help. > > > > Tom > > > > org.ofbiz.base.util.GeneralException: Error rendering screen > > > [component://accounting/widget/AccountingPrintForms.xml#InvoicePDF]: > > org.ofbiz.base.util.GeneralException: Error running BSH script at > location > > > [component://accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.bsh]: > > org.ofbiz.base.util.GeneralException: Error running BSH script at > > > [component://accounting/webapp/accounting/WEB-INF/actions/invoice/editInvoice.bsh], > > line [89]: Sourced file: > > > >
