[Vtigercrm-commits] [vtiger development] #7467: webservice sync on quotes isn't working
vtiger development
vtiger-tickets at trac.vtiger.com
Wed Jul 11 15:53:56 PDT 2012
#7467: webservice sync on quotes isn't working
-----------------------+----------------------------------------------------
Reporter: joebordes | Owner: developer
Type: defect | Status: new
Priority: critical | Milestone: 6.0.0
Component: vtigercrm | Version: 5.4.0
Severity: High | Keywords:
-----------------------+----------------------------------------------------
query generator produces incorrect alias on vtiger_users due to the
inventorymanager field and the modified by field.
The error:
{{{
ADODB error Query Failed:SELECT vtiger_quotes.quote_no,
vtiger_quotes.subject, vtiger_quotes.potentialid,
vtiger_quotes.quotestage, vtiger_quotes.validtill,
vtiger_quotes.contactid, vtiger_quotes.carrier, vtiger_quotes.subtotal,
vtiger_quotes.shipping, vtiger_quotes.inventorymanager,
vtiger_quotes.adjustment, vtiger_quotes.total, vtiger_quotes.taxtype,
vtiger_quotes.discount_percent, vtiger_quotes.discount_amount,
vtiger_quotes.s_h_amount, vtiger_quotes.accountid,
vtiger_crmentity.smownerid, vtiger_crmentity.createdtime,
vtiger_crmentity.modifiedtime, vtiger_quotes.currency_id,
vtiger_quotes.conversion_rate, vtiger_quotesbillads.bill_street,
vtiger_quotesshipads.ship_street, vtiger_quotesbillads.bill_city,
vtiger_quotesshipads.ship_city, vtiger_quotesbillads.bill_state,
vtiger_quotesshipads.ship_state, vtiger_quotesbillads.bill_code,
vtiger_quotesshipads.ship_code, vtiger_quotesbillads.bill_country,
vtiger_quotesshipads.ship_country, vtiger_quotesbillads.bill_pobox,
vtiger_quotesshipads.ship_pobox, vtiger_crmentity.description,
vtiger_quotes.terms_conditions, vtiger_crmentity.modifiedby,
vtiger_quotes.quoteid, vtiger_crmentity.deleted FROM vtiger_quotes INNER
JOIN vtiger_crmentity ON vtiger_quotes.quoteid = vtiger_crmentity.crmid
LEFT JOIN vtiger_users ON vtiger_crmentity.smownerid = vtiger_users.id
LEFT JOIN vtiger_groups ON vtiger_crmentity.smownerid =
vtiger_groups.groupid INNER JOIN vtiger_quotesbillads ON
vtiger_quotes.quoteid = vtiger_quotesbillads.quotebilladdressid INNER JOIN
vtiger_quotesshipads ON vtiger_quotes.quoteid =
vtiger_quotesshipads.quoteshipaddressid LEFT JOIN vtiger_users
vtiger_users2 ON vtiger_quotes.inventorymanager = vtiger_users2.id LEFT
JOIN vtiger_groups vtiger_groups2 ON vtiger_quotes.inventorymanager =
vtiger_groups2.groupid LEFT JOIN vtiger_users vtiger_users2 ON
vtiger_crmentity.modifiedby = vtiger_users2.id LEFT JOIN vtiger_groups
vtiger_groups2 ON vtiger_crmentity.modifiedby = vtiger_groups2.groupid
INNER JOIN (select modifiedtime, crmid,deleted,setype FROM
vtiger_crmentity WHERE setype=? and modifiedtime >? and
modifiedtime<=?and smownerid IN(?) ) vtiger_ws_sync ON
(vtiger_crmentity.crmid = vtiger_ws_sync.crmid)::->[1066]Not unique
table/alias: 'vtiger_users2'
}}}
I attach a quick patch which fixes this problem but I have no idea the
implications it may have as I am modifying the query generator
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7467>
vtiger development <http://trac.vtiger.com/>
vtiger CRM
More information about the vtigercrm-commits
mailing list