This topic is locked

Creating a Table with Custom Views

12/22/2007 1:21:03 PM
PHPRunner General questions
S
swanside author

Hello.
I have created an Invoice View, and when I click on Printer Friendly View, it shows me all the info I need, but it is in one long table.
I want to edit and move the fields around to create my own view.
I select Insert Table and visual editor for the invoice I have, I click on the Printer Friendly page and it shows me the table with the varibles in them If I copy and paste them into my table, they dont work.
ANy ideas please?

Cheers
Paul.

J
Jane 12/25/2007

Paul,
it's difficult to tell you what's happening without seeing actual files.

Please publish your project on Demo Account and send to [email=support@xlinesoft.com]support@xlinesoft.com[/email] a URL to your pages along with instructions and screenshots on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.

S
swanside author 12/26/2007

Paul,

it's difficult to tell you what's happening without seeing actual files.

Please publish your project on Demo Account and send to [email=support@xlinesoft.com]support@xlinesoft.com[/email] a URL to your pages along with instructions and screenshots on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.


Thanks Jane, I have uploaded it, but there seems to be a problme with one of my tables, it wont show anything in the materials table. So I have deleted it.
I can get over the problem by leaving the table in place, and just using one section as an Invoice number section.
My next problem is hard to explain. I have used the following SQL code which I will paste below,
select job.Job_No,

job.Order_Date,

job.File_No,

job.Order_Site_Address,

job.Job_Description

customer.Customer_Name,

customer.Billing_Address,

labour.Working_Hrs Paying_Rate,

labour.Working_Hrs
Paying_Rate 0.175,

(material.Quantity
Unit_Price Additional_Cost / 100 + Quantity Unit_Price)0.175,

material.Quantity
Unit_Price + (Quantity Unit_Price Additional_Cost / 100),

(labour.Working_Hrs Paying_Rate + material.Quantity Unit_Price + Quantity Unit_Price Additional_Cost / 100) 0.175,

labour.Working_Hrs
Paying_Rate + material.Quantity Unit_Price + (Quantity Unit_Price Additional_Cost / 100),

(labour.Working_Hrs
Paying_Rate + material.Quantity Unit_Price + Quantity Unit_Price Additional_Cost / 100) 0.175 + labour.Working_Hrs Paying_Rate + material.Quantity Unit_Price + (Quantity Unit_Price Additional_Cost / 100)

from job inner join labour

on (job.Job_No=labour.Job_No)

inner join material

on (job.Job_No=material.Job_No)

inner join customer

on (job.Customer_Name=customer.Customer_Name)
My problem is It selects the labour from the labour table and the material table, and performs the calculations OK, but if there if there is more than one entry for the labour, it repeats the material calculations for each entry.

i.e.,
One engineer might have attended a site and spent 1 hour there at £15 per hour. They might have purchased an item at £20 so the total for that would be £35.

That works OK, but, if another engineer attended the same job, spent 1 hour there at £15 but had no materals, the tottal should now be £50, but is automatically assigns a copy of the materials from the first engineer and puts them with the second engineer which is incorrect and makes a total of £70.

I will email you a scren dump of the basic invoice as an example.
Thanks

Paul.