Invoicing program

A place for users and developers of the Xataface to discuss and receive support.

Invoicing program

Postby PolderBoy » Mon Nov 14, 2011 4:26 am

Hello All,

I am making a invoicing program using xataface.
I have a table tblLines already filled with data (starttime, stoptime, project, etc)

I show the records of a certain project, but not all the lines should be on the invoice. That is depending on the user (me)
I want to select the lines I want to invoice and ignore some other lines.

Then I would like to copy them to a temp table to print a pdf.

I don't want to change the code in the xataface folder. For future updates.
I use a lot of ajax ( in a javascript and with php behind )
I would like to use the functions in the delagate pages.
tables/tablename/tablename.php

One way of doing this would be to have a button below the list page.
But then I would need to loop through the records showing in the list grid.

If that doesn't work I could build a page where the user (me) would select a project from a
pulldown and the php code would show the records outside xataface.


anyone an idee on how to do this?

Thanks in advance,
PolderBoy
PolderBoy
 
Posts: 72
Joined: Fri Apr 03, 2009 12:53 am

Re: Invoicing program

Postby jhenry » Wed Nov 16, 2011 10:34 am

Not sure if it would work but could you set up a view that grabs all the line items from the project and then set up a grid entry in the invoice to select which line items you wanted for that invoice. Just a thought.

Jason
Do not mistake understanding for realization, and do not mistake realization for liberation....Tibetan Saying.
jhenry
 
Posts: 58
Joined: Sun Jul 12, 2009 1:20 pm
Location: Florida

Re: Invoicing program

Postby PolderBoy » Fri Nov 18, 2011 1:42 am

Hello,

Thank you Jason.
You mean a view in MySql?
That would be a view with a variable (projectID)


I was more thinking in the line of:
I select project, then I make a sql string: Select * from table where Invoiced = false and projectID = $ProjectID.

This I show in xataface. Select all the lines and Unselect the ones that I don't want to invoice.
Press some save button, then in the tablename.php use the function beforesave() and there I would like to
update the table : is selected is true then Update table set ToBeInvoiced to true

But the last one is the one I am having troubles with.

I could set the standard value of ToBeInvoiced to true
Let the user select Project.
With that show the records in the grid view and set the records that shouldn't be invoiced to false.
With grid view the records are updated automaticly.
Then make the invoice for that Project.

I like the last line. (Which is what you suggested...)
Thanks Jason.

With regards,
PolderBoy
PolderBoy
 
Posts: 72
Joined: Fri Apr 03, 2009 12:53 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 10 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved