Author Topic: Avatax plgVmOnUpdateOrderPayment error checking existing DocId: Unknown column '  (Read 460 times)

G0KSC2

  • Beginner
  • *
  • Posts: 12
After the recent virtuemart update, I am seeing this error, anyone know where this might be located and how to  fix?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I wonder if this is a false positive

Code: [Select]
- Only create Avalara transaction if no existing DocId is stored
// in avalara_doc_id custom shopper field
$db = JFactory::getDBO();
$query = "SELECT avalara_doc_id" .
" FROM #__virtuemart_order_userinfos" .
" WHERE virtuemart_order_id = " . $data->virtuemart_order_id .
" AND address_type = 'BT'";
$db->setQuery($query);
$docId = null;
try {
$docId = $db->loadResult();
} catch (RuntimeException $ex) {
vmError('Avatax plgVmOnUpdateOrderPayment error checking existing DocId: ' . $ex->getMessage());
}

if (empty($docId)) {
$this->creditMemo($data);
}

The comment says - Only create Avalara transaction if no existing DocId is stored
and then it throws always an exception if it is not there? But below is a normal flow when it is not there. Does it work otherwise?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/