Added by sgarg about 16 years ago
Fixed a bug which doesn't occur everytime. The bug occurs when lastid in (cfg).lastid is not unique. i.e. there is already a document in the server which has same docid. The earlier algorithm was:
get accession number;
update accession number written in document; (BUG)
if error do update last id and then do again.
The bug was that the statement replaced the docid in the xml document only the first time - not every time the loop was executed.
Hence it resulted in documents which had docid written inside them different then the docid with which they were inserted into the system.
This is fixed now.