function updateVentaDeProductos($idVentaDeProducto, $idVenta, $action = "")
 {
     global $log, $current_module, $adb, $current_user;
     if ($action == "DELETE") {
         $log->debug("Entering handle delete sotos");
         $sql = "UPDATE vtiger_ventadeproductos SET registrodeventasid=NULL where ventadeproductosid = ? ";
         $result = $adb->pquery($sql, array($idVentaDeProducto));
     }
     RegistroDeVentasHandler::updateVentas($idVenta);
     $log->debug("Entering handle ventaproductos");
     return true;
 }
Example #2
0
 function updateBoletos($idBoleto, $idVenta, $action = "")
 {
     global $log, $current_module, $adb, $current_user;
     if ($action == "DELETE") {
         $log->debug("Entering handle delete sotos");
         $sql = "UPDATE vtiger_boletos SET registrodeventasid=NULL where boletosid = ? ";
         $result = $adb->pquery($sql, array($idBoleto));
     }
     $log->debug("Entering handleboletos ");
     RegistroDeVentasHandler::updateVentas($idVenta);
     $sqlTotal = "UPDATE vtiger_boletos SET totalboletos=amount*cantidad where boletosid=?";
     $result = $adb->pquery($sqlTotal, array($idBoleto));
     return true;
 }