[freeside-users] updating customer info nukes agent_custid
Charles Sprickman
spork at bway.net
Mon May 19 21:18:21 PDT 2008
Howdy,
I found an odd problem that I've been able to duplicate in a few Freeside
installs that I'm using for testing. I imported a number of clients and
in the CSV file I mapped the old billing system's customer ID to
"agent_custid" (or "Agent customer ref#" in the web UI). When I view the
imported customers, this field is filled-in.
If I alter something (in my case, turning on postal invoices),
agent_custid in the cust_main table gets nuked. From the history table:
freeside=> SELECT historynum, history_date, history_action, custnum,
agent_custid from h_cust_main where custnum = 4173 order by history_date;
historynum | history_date | history_action | custnum | agent_custid
------------+--------------+----------------+---------+--------------
4263 | 1211171728 | insert | 4173 | 134
5135 | 1211251459 | replace_old | 4173 | 134
5136 | 1211251459 | replace_new | 4173 |
(3 rows)
I can't quite follow the code, but I see in freeside/edit/cust_main.cgi
there's no mention of agent_custid, but there is this little snippet in
the script that processes the form (freeside/edit/process/cust_main.cgi):
delete( $new->hashref->{'agent_custid'} )
unless $new->hashref->{'agent_custid'};
Replacing the delete with a noop doesn't change the behavior, so I'm
likely not on the right track.
Any ideas? This is somewhat-pre-1.7.3.
Thanks,
Charles
More information about the freeside-users
mailing list