Invoice Tutorial

Hi All,

I am a fairly new to servoy, and have come from a filemaker backround, I am currently designing a basic invoice system for a client, and would really appreciate some help with setting up relationships etc. Is their a tutorial on this subject. eg setting up relationships between invoice tables and invoice_line_item tables. etc

Many thanks

PR

Hi occasion,

Welcome to the wonderfull world of Servoy. You will feel ‘alive and kicking’ after some time with this great tool. On the other hand I can imagine you feel overwhelmed.

All answers should be in the crm solution that is shipped with your developer installation. Don’t let the thing scrare you off with it’s ‘banana-interface’, there are some real good examples of relationships etc. in there.

Cheers

Good morning PR

As the legendary Marcel says ‘Welcome to Servoy’

In addition to the CRM demo and this Forum you should take a look at Servoy Magazine - http://www.servoymagazine.com/ - lots of tips and tutorials.

Graham Greensall
Worxinfo Ltd

How the **&(%^*& can I forget about that :?

I think I woke up with a memory leak…

Thanks for the compliment Graham, not sure if I deserve it though. There is still so much to learn…

For me the PDF file “Servoy Advanced Programming Guide For FileMaker Developers” was really the bible.

I don’t know if it’s still downloadable…

Best Regards,
Stef

Here it is:

http://developer.servoy.com/generic.jsp?taxonomy_id=352

HTH
Stef

Hi PR

As per the previous posts by Graham and (legendary;)) Marcel, welcome you can look forward to a very rewarding if long learning curve. O’reilly do a great book on Java Scripting if you don’t already have it its essential for Servoy!!

Good Luck! :D
Gordon

Hi,
Many thanks for the welcome, and quick reply, I will do some reading and will be back with more questions I am sure

Thanks

PR

Hi All,
I am sorry in advance for what is probally a supid question, I have looked at the sample CRM solution and found what seems to be the snippet of code that would work. But I am having trouble understanding where the section is that returns the selected value from the popup customer list to the invoice form.

if(globals.formName == “orderDetails”)

{
forms.orderDetails.company_id = companiesid;

var portalrows = forms.orderDetails.elements.portalLineItems.getMaxRecordIndex()
for ( var i = 1 ; i <= portalrows ; i++ )
{
forms.orderDetails.elements.portalLineItems.recordIndex = i;
forms.orderDetails.orders_to_line_items.company_id = companiesid;
}

}

if(globals.formName == “actionDetails”)
{
forms.actionDetails.company_id = companiesid;
}

application.closeFormDialog()

I would really appreciate some help

PR

I don’t know the crm solution and I am not on my servoy machine right now but I think is the this part

var portalrows = forms.orderDetails.elements.portalLineItems.getMaxRecordIndex() 
for ( var i = 1 ; i <= portalrows ; i++ ) 
{ 
forms.orderDetails.elements.portalLineItems.recordIndex = i; 
forms.orderDetails.orders_to_line_items.company_id = companiesid; 
} 

}

It checks for the number of orderdetail items and loops throught them and assigns each line the company id…

Is that it?

Hi IT2BE,

This is the bit I don’t understand, the method does not need to return any data to a portal row, only to a single feild on the form, I almost want to just copy the required feild in the related form and paste it in to the required feild in the target form, infact this is the way filemaker performed the action I require, I know there must be a simple solution to what I want (and I am just a Dummy)

Many thanks

PR

Hi PR,

The bit that you need to concern yourself with then is :

forms.orderDetails.company_id = companiesid;

This bit is the equivalent to a FM Set Field step and is setting the ‘company_id’ field - which is on the ‘orderDetails’ form - to the ‘companiesid’ which you chose from the list of customers in the list.

The loop which Marcel indicated then cycles through each related record and sets the chosen company di into each of those records - but at this stage you don’t seem to need that !

Cheers
Harry