diff --git a/ChangeLog b/ChangeLog index bcc4a9ad66c..9fb65d403a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -231,6 +231,8 @@ FIX [ bug #2855 ] Wrong translation key in localtax report page FIX [ bug #1852 ] JS error when editing a customer order line FIX [ bug #2900 ] Courtesy title is not stored in create thirdparty form FIX [ bug #3055 ] Product image thumbnails were not deleted after deleting the image +FIX [ bug 1634 ] Error deleting a project when it had many linked objects +FIX [ bug 1925 ] "Link to order" option in supplier invoices is not working properly ***** ChangeLog for 3.7.1 compared to 3.7.* ***** FIX Bug in the new photo system diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 3163200f2f4..2b31d1f26a6 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -475,6 +475,7 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/oscim*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`; diff --git a/htdocs/.gitignore b/htdocs/.gitignore index bd9c176df9b..e26ae1a0f45 100644 --- a/htdocs/.gitignore +++ b/htdocs/.gitignore @@ -1,13 +1,14 @@ -/test.php -/extensions* -/nltechno* /ancot* -/teclib* /bootstrap* +/extensions* /google* /multicompany* +/ndf* /numberingpack* +/nltechno* /ovh* /pos +/teclib* +/test.php /ultimatepdf* /lead diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index ec2a6c4a182..5e8f898e830 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -456,11 +456,12 @@ class ActionComm extends CommonObject /** * Load object from database * - * @param int $id Id of action to get - * @param string $ref Ref of action to get - * @return int <0 if KO, >0 if OK + * @param int $id Id of action to get + * @param string $ref Ref of action to get + * @param string $ref_ext Ref ext to get + * @return int <0 if KO, >0 if OK */ - function fetch($id, $ref='') + function fetch($id, $ref='',$ref_ext='') { global $langs; @@ -484,11 +485,12 @@ class ActionComm extends CommonObject $sql.= " s.nom as socname,"; $sql.= " u.firstname, u.lastname as lastname"; $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a "; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action=c.id "; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action=c.id "; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc"; $sql.= " WHERE "; - if ($ref) $sql.= " a.id=".$ref; // No field ref, we use id + if ($ref) $sql.= " a.id=".$ref; // No field ref, we use id + elseif ($ref_ext) $sql.= " a.ref_ext='".$this->db->escape($ref_ext)."'"; else $sql.= " a.id=".$id; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 088c36e06df..9eae0038194 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -272,6 +272,7 @@ function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengt /** * Convert a string date into a GM Timestamps date + * Warning: YYYY-MM-DDTHH:MM:SS+02:00 (RFC3339) is not supported. If parameter gm is 1, we will use no TZ, if not we will use TZ of server, not the one inside string. * * @param string $string Date in a string * YYYYMMDD @@ -306,8 +307,8 @@ function dol_stringtotime($string, $gm=1) $string=sprintf("%04d%02d%02d%02d%02d%02d",$syear,$smonth,$sday,$shour,$smin,$ssec); } else if ( - preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})Z$/i',$string,$reg) // Convert date with format RFC3339 - || preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})$/i',$string,$reg) // Convert date with format YYYY-MM-DD HH:MM:SS + preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})Z$/i',$string,$reg) // Convert date with format YYYY-MM-DDTHH:MM:SSZ (RFC3339) + || preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})$/i',$string,$reg) // Convert date with format YYYY-MM-DD HH:MM:SS || preg_match('/^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z$/i',$string,$reg) // Convert date with format YYYYMMDDTHHMMSSZ ) { diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index c3bbced76bd..9dd7435c95c 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -887,7 +887,7 @@ if (empty($reshook)) if (GETPOST('linkedOrder')) { $object->fetch($id); $object->fetch_thirdparty(); - $result = $object->add_object_linked('commande', GETPOST('linkedOrder')); + $result = $object->add_object_linked('order_supplier', GETPOST('linkedOrder')); } // Add file in email form diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 7ab54181b77..49923afa2ea 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -250,7 +250,7 @@ if (empty($reshook)) if ($result < 0) { $error++; - setEventMessage($object->errors,'errors'); + setEventMessages($object->error, $object->errors,'errors'); } } @@ -373,7 +373,7 @@ if (empty($reshook)) $result=$object->createFromClone($object->id,$clone_contacts,$clone_tasks,$clone_project_files,$clone_task_files,$clone_notes,$move_date); if ($result <= 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } else { diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 0bf57ebb922..a4bd66bc49d 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -617,7 +617,7 @@ class Project extends CommonObject $resql = $this->db->query($sql); if (!$resql) { - $this->errors[] = $this->db->lasterror(); + $this->errors[] = $langs->trans("CantRemoveProject"); $error++; } }