[Vtigercrm-developers] Update to Quote fixes for 4.2.4

Andrew Rodes arodes at onweald.com
Mon Feb 27 07:49:52 PST 2006


 Hello all,

Thanks for testing out the small patch I submitted last week. I did receive
a bit of feedback regarding the changes to save.php in modules/quotes.

Basically, I discovered that I attached an earlier version of the save.php
file then I had intended to submit. The version I sent was still inserting
the word "null" in all empty fields. I have included a more recent file that
only inserts null if the field is a fk.

Please use this version of save.php

Thanks,

Andy
-----Original Message-----
From: Andy Rodes [mailto:arodes at aircanopy.net] 
Sent: Wednesday, February 22, 2006 12:04 PM
To: 'vtigercrm-developers at lists.vtigercrm.com'
Subject: Looking for testers for a create quote bug (with both attachments
this time)

hello all ... This is my first post here, but talking with Mike on IRC he
suggested I post a small change I made to a couple of files here for testing
before including it in 4.2.4.

Basically, you cannot create a quote from the potential screen in 4.2.x
today.

Here is the test case:
Navigate to potential screen via potential tab click Drilldown on a
potential from the returned list by clicking on the potential name (not sure
If it matters, but the potentials I tested from were created from the lead
screen -> convert to potential process) The system takes you to the
potential detail view Scroll down to the Quotes section Click "New Quote"
button System takes you to a new quote detail view and defaults the account
name and defaults the potential name
NOTE: today, the contact name is not brought over from the potential. This
should probably be addressed in the future, but is not a bug, but is more of
a new feature Fill in the required fields: Subject, billing address,
shipping address Hit the Save button at the bottom of the form.

Expected result:

The system should save the quote, and return you to the detail potential
screen where you can now see the quote listed in the quotes section under
the potential.

In 4.2.3 ... It appears to the user that the quote was created, but it never
shows up on the potential screen nor in the list of all quotes via the
quotes tab


Summary of Code Changes:


/modules/potentials/RenderRelatedListUI.php


Changed the function getHiddenValues($id) to default the contact id to ''
rather then the passed in $id since the passed in $id is the $id of the
potential, NOT the contact 

/modules/quotes/save.php

Added a check for incoming field values such that if the field name looks
like a foreign key, we set the value to 'null' rather then just '' due to a
mysql need.TODO: would be nice to make this more resilient to actually
figure out if a column is a FK rather then just using some light logic like
I am doing here.

I attached the 2 files with my changes here. You can simply drop them into
the correct folders as I listed above to test them. Also, I delta's the
files against what is showing up in the current 4.2.4
(http://vtiger.fosslabs.com/svn/vtiger/vtigercrm/branches/4.2/) and my
changes are the only ones that I saw so no merging should be needed at this
time.

Also .. I don't know the regression testing process, but it seems that
saving quotes in general might need to be regression tested since I changed
that file.



-------------------------------------------------------------------
Andrew Rodes
Onweald Inc.
skype.andyrodes
phn.214-483-1249
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Save.php
Type: application/octet-stream
Size: 9795 bytes
Desc: not available
Url : http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20060227/901d21a3/attachment-0003.obj 


More information about the vtigercrm-developers mailing list