diff --git a/COPYRIGHT b/COPYRIGHT index cec924445be..68dca230679 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -58,6 +58,7 @@ Copyright (C) 2012 - Florian Henry - Jean-François Ferry - Maxime Kohlhaas +- Nicolas Péré Copyright (C) 2011 - Laurent Destailleur diff --git a/ChangeLog b/ChangeLog index 54575892715..1c4bbc9f6ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -101,6 +101,9 @@ For developers: - New: Add PRODUCT_PRICE_MODIFY trigger. - New: Created function to retrieve total amount of discount of an invoice/proposal... - New: We can use a dynamic value ($conf->global->XXX for example) into titles of menus. +- Qual: Renamed SUPPLIER_INVOICE_BUILDDOC trigger to BILL_SUPPLIER_BUILDDOC +- Qual: Renamed INVOICE_SUPPLIER_DELETE trigger to BILL_SUPPLIER_DELETE +- Qual: Renamed SUPLLIER_ORDER_BUILDDOC trigger to ORDER_SUPPLIER_BUILDDOC For translators: - New: Update language files (de, tr, pt, ca, es, en, fr). diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index bd628eacc74..8acf2ae85af 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -198,199 +198,209 @@ else if ($action == 'add' && $user->rights->commande->creer) $datecommande = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $datelivraison = dol_mktime(12, 0, 0, GETPOST('liv_month'),GETPOST('liv_day'),GETPOST('liv_year')); - $object->socid=$socid; - $object->fetch_thirdparty(); - - $db->begin(); - - $object->date_commande = $datecommande; - $object->note = GETPOST('note'); - $object->note_public = GETPOST('note_public'); - $object->source = GETPOST('source_id'); - $object->fk_project = GETPOST('projectid'); - $object->ref_client = GETPOST('ref_client'); - $object->modelpdf = GETPOST('model'); - $object->cond_reglement_id = GETPOST('cond_reglement_id'); - $object->mode_reglement_id = GETPOST('mode_reglement_id'); - $object->availability_id = GETPOST('availability_id'); - $object->demand_reason_id = GETPOST('demand_reason_id'); - $object->date_livraison = $datelivraison; - $object->fk_delivery_address = GETPOST('fk_address'); - $object->contactid = GETPOST('contactidp'); - - // If creation from another object of another module (Example: origin=propal, originid=1) - if (! empty($origin) && ! empty($originid)) + if ($datecommande == '') { - // Parse element/subelement (ex: project_task) - $element = $subelement = $origin; - if (preg_match('/^([^_]+)_([^_]+)/i',$origin,$regs)) + $mesg='
'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('Date')).'
'; + $action='create'; + $error++; + } + + if (! $error) + { + $object->socid=$socid; + $object->fetch_thirdparty(); + + $db->begin(); + + $object->date_commande = $datecommande; + $object->note = GETPOST('note'); + $object->note_public = GETPOST('note_public'); + $object->source = GETPOST('source_id'); + $object->fk_project = GETPOST('projectid'); + $object->ref_client = GETPOST('ref_client'); + $object->modelpdf = GETPOST('model'); + $object->cond_reglement_id = GETPOST('cond_reglement_id'); + $object->mode_reglement_id = GETPOST('mode_reglement_id'); + $object->availability_id = GETPOST('availability_id'); + $object->demand_reason_id = GETPOST('demand_reason_id'); + $object->date_livraison = $datelivraison; + $object->fk_delivery_address = GETPOST('fk_address'); + $object->contactid = GETPOST('contactidp'); + + // If creation from another object of another module (Example: origin=propal, originid=1) + if (! empty($origin) && ! empty($originid)) { - $element = $regs[1]; - $subelement = $regs[2]; - } - - // For compatibility - if ($element == 'order') { - $element = $subelement = 'commande'; - } - if ($element == 'propal') { - $element = 'comm/propal'; $subelement = 'propal'; - } - if ($element == 'contract') { - $element = $subelement = 'contrat'; - } - - $object->origin = $origin; - $object->origin_id = $originid; - - // Possibility to add external linked objects with hooks - $object->linked_objects[$object->origin] = $object->origin_id; - $other_linked_objects=GETPOST('other_linked_objects','array'); - if (! empty($other_linked_objects)) - { - $object->linked_objects = array_merge($object->linked_objects, $other_linked_objects); - } - - $object_id = $object->create($user); - - if ($object_id > 0) - { - dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); - - $classname = ucfirst($subelement); - $srcobject = new $classname($db); - - dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); - $result=$srcobject->fetch($object->origin_id); - if ($result > 0) + // Parse element/subelement (ex: project_task) + $element = $subelement = $origin; + if (preg_match('/^([^_]+)_([^_]+)/i',$origin,$regs)) { - $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject,'fetch_lines')) $lines = $srcobject->fetch_lines(); - - $fk_parent_line=0; - $num=count($lines); - - for ($i=0;$i<$num;$i++) + $element = $regs[1]; + $subelement = $regs[2]; + } + + // For compatibility + if ($element == 'order') { + $element = $subelement = 'commande'; + } + if ($element == 'propal') { + $element = 'comm/propal'; $subelement = 'propal'; + } + if ($element == 'contract') { + $element = $subelement = 'contrat'; + } + + $object->origin = $origin; + $object->origin_id = $originid; + + // Possibility to add external linked objects with hooks + $object->linked_objects[$object->origin] = $object->origin_id; + $other_linked_objects=GETPOST('other_linked_objects','array'); + if (! empty($other_linked_objects)) + { + $object->linked_objects = array_merge($object->linked_objects, $other_linked_objects); + } + + $object_id = $object->create($user); + + if ($object_id > 0) + { + dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); + + $classname = ucfirst($subelement); + $srcobject = new $classname($db); + + dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); + $result=$srcobject->fetch($object->origin_id); + if ($result > 0) { - $label=(! empty($lines[$i]->label)?$lines[$i]->label:''); - $desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle); - $product_type=(! empty($lines[$i]->product_type)?$lines[$i]->product_type:0); - - // Dates - // TODO mutualiser - $date_start=$lines[$i]->date_debut_prevue; - if ($lines[$i]->date_debut_reel) $date_start=$lines[$i]->date_debut_reel; - if ($lines[$i]->date_start) $date_start=$lines[$i]->date_start; - $date_end=$lines[$i]->date_fin_prevue; - if ($lines[$i]->date_fin_reel) $date_end=$lines[$i]->date_fin_reel; - if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end; - - // Reset fk_parent_line for no child products and special product - if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { - $fk_parent_line = 0; - } - - $result = $object->addline( - $object_id, - $desc, - $lines[$i]->subprice, - $lines[$i]->qty, - $lines[$i]->tva_tx, - $lines[$i]->localtax1_tx, - $lines[$i]->localtax2_tx, - $lines[$i]->fk_product, - $lines[$i]->remise_percent, - $lines[$i]->info_bits, - $lines[$i]->fk_remise_except, - 'HT', - 0, - $datestart, - $dateend, - $product_type, - $lines[$i]->rang, - $lines[$i]->special_code, - $fk_parent_line, - $lines[$i]->fk_fournprice, - $lines[$i]->pa_ht, - $label - ); - - if ($result < 0) + $lines = $srcobject->lines; + if (empty($lines) && method_exists($srcobject,'fetch_lines')) $lines = $srcobject->fetch_lines(); + + $fk_parent_line=0; + $num=count($lines); + + for ($i=0;$i<$num;$i++) { - $error++; - break; - } - - // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) { - $fk_parent_line = $result; + $label=(! empty($lines[$i]->label)?$lines[$i]->label:''); + $desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle); + $product_type=(! empty($lines[$i]->product_type)?$lines[$i]->product_type:0); + + // Dates + // TODO mutualiser + $date_start=$lines[$i]->date_debut_prevue; + if ($lines[$i]->date_debut_reel) $date_start=$lines[$i]->date_debut_reel; + if ($lines[$i]->date_start) $date_start=$lines[$i]->date_start; + $date_end=$lines[$i]->date_fin_prevue; + if ($lines[$i]->date_fin_reel) $date_end=$lines[$i]->date_fin_reel; + if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end; + + // Reset fk_parent_line for no child products and special product + if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { + $fk_parent_line = 0; + } + + $result = $object->addline( + $object_id, + $desc, + $lines[$i]->subprice, + $lines[$i]->qty, + $lines[$i]->tva_tx, + $lines[$i]->localtax1_tx, + $lines[$i]->localtax2_tx, + $lines[$i]->fk_product, + $lines[$i]->remise_percent, + $lines[$i]->info_bits, + $lines[$i]->fk_remise_except, + 'HT', + 0, + $datestart, + $dateend, + $product_type, + $lines[$i]->rang, + $lines[$i]->special_code, + $fk_parent_line, + $lines[$i]->fk_fournprice, + $lines[$i]->pa_ht, + $label + ); + + if ($result < 0) + { + $error++; + break; + } + + // Defined the new fk_parent_line + if ($result > 0 && $lines[$i]->product_type == 9) { + $fk_parent_line = $result; + } } + + // Hooks + $parameters=array('objFrom'=>$srcobject); + $reshook=$hookmanager->executeHooks('createFrom',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if ($reshook < 0) $error++; + } + else + { + $mesg=$srcobject->error; + $error++; } - - // Hooks - $parameters=array('objFrom'=>$srcobject); - $reshook=$hookmanager->executeHooks('createFrom',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - if ($reshook < 0) $error++; } else { - $mesg=$srcobject->error; + $mesg=$object->error; $error++; } } else { - $mesg=$object->error; - $error++; - } - } - else - { - $object_id = $object->create($user); - - // If some invoice's lines already known - $NBLINES=8; - for ($i = 1 ; $i <= $NBLINES ; $i++) - { - if ($_POST['idprod'.$i]) + $object_id = $object->create($user); + + // If some invoice's lines already known + $NBLINES=8; + for ($i = 1 ; $i <= $NBLINES ; $i++) { - $xid = 'idprod'.$i; - $xqty = 'qty'.$i; - $xremise = 'remise_percent'.$i; - $object->add_product($_POST[$xid],$_POST[$xqty],$_POST[$xremise]); + if ($_POST['idprod'.$i]) + { + $xid = 'idprod'.$i; + $xqty = 'qty'.$i; + $xremise = 'remise_percent'.$i; + $object->add_product($_POST[$xid],$_POST[$xqty],$_POST[$xremise]); + } } } - } - - // Insert default contacts if defined - if ($object_id > 0) - { - if (GETPOST('contactidp')) + + // Insert default contacts if defined + if ($object_id > 0) { - $result=$object->add_contact(GETPOST('contactidp'),'CUSTOMER','external'); - if ($result < 0) + if (GETPOST('contactidp')) { - $mesg = '
'.$langs->trans("ErrorFailedToAddContact").'
'; - $error++; + $result=$object->add_contact(GETPOST('contactidp'),'CUSTOMER','external'); + if ($result < 0) + { + $mesg = '
'.$langs->trans("ErrorFailedToAddContact").'
'; + $error++; + } } + + $id = $object_id; + $action = ''; + } + + // End of object creation, we show it + if ($object_id > 0 && ! $error) + { + $db->commit(); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object_id); + exit; + } + else + { + $db->rollback(); + $action='create'; + if (! $mesg) $mesg='
'.$object->error.'
'; } - - $id = $object_id; - $action = ''; - } - - // End of object creation, we show it - if ($object_id > 0 && ! $error) - { - $db->commit(); - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object_id); - exit; - } - else - { - $db->rollback(); - $action='create'; - if (! $mesg) $mesg='
'.$object->error.'
'; } } diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php index 0ec5b408286..f5603cdb6f0 100644 --- a/htdocs/core/modules/fichinter/modules_fichinter.php +++ b/htdocs/core/modules/fichinter/modules_fichinter.php @@ -227,7 +227,7 @@ function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $ // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($db); - $result=$interface->run_triggers('FICHEINTER_BUILDDOC',$object,$user,$langs,$conf); + $result=$interface->run_triggers('FICHINTER_BUILDDOC',$object,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -247,4 +247,4 @@ function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $ } } -?> \ No newline at end of file +?> diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index de1aec1196c..0cc12e8d177 100755 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -311,7 +311,7 @@ class InterfaceActionsAuto $object->sendtoid=0; $ok=1; } - elseif ($action == 'FICHEINTER_VALIDATE') + elseif ($action == 'FICHINTER_VALIDATE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); @@ -328,7 +328,7 @@ class InterfaceActionsAuto $object->elementtype=''; $ok=1; } - elseif ($action == 'FICHEINTER_SENTBYMAIL') + elseif ($action == 'FICHINTER_SENTBYMAIL') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index 385978844ba..9621112cab3 100755 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -29,8 +29,14 @@ class InterfaceNotification { var $db; - var $listofmanagedevents=array('BILL_VALIDATE','ORDER_VALIDATE','PROPAL_VALIDATE', - 'FICHEINTER_VALIDATE','ORDER_SUPPLIER_APPROVE','ORDER_SUPPLIER_REFUSE'); + var $listofmanagedevents=array( + 'BILL_VALIDATE', + 'ORDER_VALIDATE', + 'PROPAL_VALIDATE', + 'FICHINTER_VALIDATE', + 'ORDER_SUPPLIER_APPROVE', + 'ORDER_SUPPLIER_REFUSE' + ); /** * Constructor @@ -146,7 +152,7 @@ class InterfaceNotification $notify->send($action, $object->socid, $mesg, 'propal', $object->id, $filepdf); } - elseif ($action == 'FICHEINTER_VALIDATE') + elseif ($action == 'FICHINTER_VALIDATE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 8773d008356..b458d63389a 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -164,18 +164,27 @@ class Fichinter extends CommonObject if (! $ret) dol_print_error($this->db); } - $this->db->commit(); - // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $result=$interface->run_triggers('FICHEINTER_CREATE',$this,$user,$langs,$conf); + $result=$interface->run_triggers('FICHINTER_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers - return $this->id; + if (! $error) + { + $this->db->commit(); + return $this->id; + } + else + { + $this->db->rollback(); + $this->error=join(',',$this->errors); + dol_syslog(get_class($this)."::create ".$this->error,LOG_ERR); + return -1; + } } else { @@ -213,7 +222,7 @@ class Fichinter extends CommonObject // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $result=$interface->run_triggers('FICHEINTER_MODIFY',$this,$user,$langs,$conf); + $result=$interface->run_triggers('FICHINTER_MODIFY',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } @@ -357,14 +366,14 @@ class Fichinter extends CommonObject $sql.= " AND entity = ".$conf->entity; $sql.= " AND fk_statut = 0"; - dol_syslog("Fichinter::setValid sql=".$sql); + dol_syslog(get_class($this)."::setValid sql=".$sql); $resql=$this->db->query($sql); if ($resql) { // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $result=$interface->run_triggers('FICHEINTER_VALIDATE',$this,$user,$langs,$conf); + $result=$interface->run_triggers('FICHINTER_VALIDATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -377,7 +386,7 @@ class Fichinter extends CommonObject { $this->db->rollback(); $this->error=join(',',$this->errors); - dol_syslog("Fichinter::setValid ".$this->error,LOG_ERR); + dol_syslog(get_class($this)."::setValid ".$this->error,LOG_ERR); return -1; } } @@ -385,7 +394,7 @@ class Fichinter extends CommonObject { $this->db->rollback(); $this->error=$this->db->lasterror(); - dol_syslog("Fichinter::setValid ".$this->error,LOG_ERR); + dol_syslog(get_class($this)."::setValid ".$this->error,LOG_ERR); return -1; } } @@ -675,7 +684,7 @@ class Fichinter extends CommonObject // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); - $result=$interface->run_triggers('FICHEINTER_DELETE',$this,$user,$langs,$conf); + $result=$interface->run_triggers('FICHINTER_DELETE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 95893cdc5b3..6694a20684c 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -719,7 +719,7 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($db); - $result=$interface->run_triggers('FICHEINTER_SENTBYMAIL',$object,$user,$langs,$conf); + $result=$interface->run_triggers('FICHINTER_SENTBYMAIL',$object,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers @@ -1387,7 +1387,7 @@ else if ($id > 0 || ! empty($ref)) else print ''.$langs->trans("CreateBill").''; } - if (! empty($conf->global->FICHEINTER_CLASSIFY_BILLED)) + if (! empty($conf->global->FICHINTER_CLASSIFY_BILLED)) { if ($object->statut != 2) { diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 3d39c81a3cb..3f69dc09fde 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -181,4 +181,4 @@ if ($id > 0 || ! empty($ref)) llxFooter(); $db->close(); -?> \ No newline at end of file +?> diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index d5b2c181ccc..fa984f55b8a 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -175,4 +175,4 @@ if ($id > 0 || ! empty($ref)) llxFooter(); $db->close(); -?> \ No newline at end of file +?> diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index db750fb9763..7dd3684a913 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -230,6 +230,13 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer) $datefacture=dol_mktime(12,0,0,$_POST['remonth'],$_POST['reday'],$_POST['reyear']); $datedue=dol_mktime(12,0,0,$_POST['echmonth'],$_POST['echday'],$_POST['echyear']); + if (GETPOST('socid','int')<1) + { + $mesg='
'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('Supplier')).'
'; + $action='create'; + $error++; + } + if ($datefacture == '') { $mesg='
'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('DateInvoice')).'
'; diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql index b67d59dfa76..f6a60d9725b 100644 --- a/htdocs/install/mysql/data/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql @@ -30,7 +30,7 @@ -- List of all managed triggered events (used for trigger agenda and for notification) -- delete from llx_c_action_trigger; -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (1,'FICHEINTER_VALIDATE','Intervention validated','Executed when a intervention is validated','ficheinter',18); +insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (1,'FICHINTER_VALIDATE','Intervention validated','Executed when a intervention is validated','ficheinter',18); insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (2,'BILL_VALIDATE','Customer invoice validated','Executed when a customer invoice is approved','facture',6); insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (3,'ORDER_SUPPLIER_APPROVE','Supplier order request approved','Executed when a supplier order is approved','order_supplier',11); insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (4,'ORDER_SUPPLIER_REFUSE','Supplier order request refused','Executed when a supplier order is refused','order_supplier',12); diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql index 7b55bcd164b..3a0f6b9cd29 100755 --- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -905,3 +905,5 @@ ALTER TABLE llx_element_lock ADD COLUMN sessionid varchar(255) AFTER datem; ALTER TABLE llx_element_lock MODIFY COLUMN elementtype varchar(32) NOT NULL; ALTER TABLE llx_element_lock DROP COLUMN fk_user_modif; ALTER TABLE llx_element_lock DROP COLUMN status; + +DELETE FROM llx_c_action_trigger WHERE elementtype='withdraw';