diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 906ab3ec5f7..57986f3bb31 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -2,7 +2,15 @@ #---------------------------------------------------------------------------- # \file build/makepack-dolibarr.pl # \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps) -# \author (c)2004-2012 Laurent Destailleur +# \author (c)2004-2013 Laurent Destailleur +# +# This is list of constant you can set to have generated packages moved into a specific dir: +#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild' +#DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable' +#DESTIMODULES='/media/HDDATA1_LD/Mes Sites/Web/Admin1/wwwroot/files/modules' +#DESTIDOLIMEDBETARC='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/lastbuild' +#DESTIDOLIMEDMODULES='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/modules' +#DESTIDOLIMEDSTABLE='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/stable' #---------------------------------------------------------------------------- use Cwd; diff --git a/build/makepack-dolibarrmodule.pl b/build/makepack-dolibarrmodule.pl index a4b51e9bf8f..0babf13e0b1 100755 --- a/build/makepack-dolibarrmodule.pl +++ b/build/makepack-dolibarrmodule.pl @@ -2,13 +2,15 @@ #---------------------------------------------------------------------------- # \file build/makepack-dolibarrmodule.pl # \brief Package builder (tgz, zip, rpm, deb, exe) -# \author (c)2005-2006 Laurent Destailleur +# \author (c)2005-2013 Laurent Destailleur #---------------------------------------------------------------------------- use Cwd; +$OWNER="ldestailleur"; +$GROUP="ldestailleur"; -@LISTETARGET=("TGZ"); # Possible packages +@LISTETARGET=("ZIP"); # Possible packages %REQUIREMENTTARGET=( # Tool requirement for each package "TGZ"=>"tar", "ZIP"=>"7z" @@ -272,7 +274,6 @@ foreach my $PROJECT (@PROJECTLIST) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom2`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/bureau2crea`; $ret=`rm -fr $BUILDROOT/$PROJECT/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`; $ret=`rm -fr $BUILDROOT/$PROJECT/CVS* $BUILDROOT/$PROJECT/*/CVS* $BUILDROOT/$PROJECT/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/CVS*`; @@ -323,6 +324,7 @@ foreach my $PROJECT (@PROJECTLIST) { print "Move $FILENAMEZIP.zip to $NEWDESTI/$FILENAMEZIP.zip\n"; $ret=`mv "$BUILDROOT/$FILENAMEZIP.zip" "$NEWDESTI/$FILENAMEZIP.zip"`; + $ret=`chown $OWNER.$GROUP "$NEWDESTI/$FILENAMEZIP.zip"`; next; } diff --git a/build/obs/README b/build/obs/README index 56589299b89..5f8f0014d8a 100644 --- a/build/obs/README +++ b/build/obs/README @@ -34,3 +34,12 @@ Enter the Remote URL that should looks like this: http://www.dolibarr.org/files/ Then add into advanded - attributes OBS:Screenshots http://www.dolibarr.org/images/dolibarr_screenshot1.png OBS:QualityCategory Testing + + +# Move project into official directory +- Enter a bug to ask to be a maintener of a category or to add a new one. +For example: https://bugzilla.novell.com/show_bug.cgi?id=848083 to be a maintener of category +https://build.opensuse.org/project/show/Application:ERP +- Once done, go into project, category, subproject and enter a subproject for your application. +Fo example: Dolibarr +- Then go onto project into your home and ask a publish to the category/you project your created. diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 293796c77a5..ee07ee7255e 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3859,21 +3859,21 @@ else if ($id > 0 || ! empty($ref)) { /* * Affiche formulaire mail - */ + */ // By default if $action=='presend' $titreform='SendBillByMail'; $topicmail='SendBillRef'; - $action='send'; $modelmail='facture_send'; if ($action == 'prerelance') // For backward compatibility { $titrefrom='SendReminderBillByMail'; $topicmail='SendReminderBillRef'; - $action='relance'; $modelmail='facture_relance'; + $action='relance'; } + else $action='send'; $ref = dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index f00d637d375..bff890a09b7 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -124,6 +124,7 @@ class Contact extends CommonObject if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname); if (! $this->socid) $this->socid = 0; if (! $this->priv) $this->priv = 0; + if (empty($this->statut)) $this->statut = 0; $sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople ("; $sql.= " datec"; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index b26b050dfd4..39916775507 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -935,6 +935,10 @@ class ExtraFields $sql = 'SELECT '.$keyList; $sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0]; + if (strpos($InfoFieldList[4], 'extra')!==false) + { + $sql.= ' as main'; + } $sql.= ' WHERE '.$selectkey.'=\''.$this->db->escape($value).'\''; //$sql.= ' AND entity = '.$conf->entity; dol_syslog(get_class($this).':showOutputField:$type=sellist sql='.$sql); diff --git a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php index 501bfc153b0..68cf3de470c 100644 --- a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php @@ -529,7 +529,6 @@ class doc_generic_project_odt extends ModelePDFProjects else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); - $odfHandler->setVarsHeadFooter($key, $value, true, 'UTF-8'); } } catch(OdfException $e) @@ -1037,4 +1036,4 @@ class doc_generic_project_odt extends ModelePDFProjects } } -?> \ No newline at end of file +?> diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index e4c0e27ce47..f625cead27c 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -59,6 +59,8 @@ if ($user->societe_id > 0) } +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('paymentsupplier')); /* diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 94c69705442..d2cb8e0b6e1 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -128,33 +128,6 @@ class Odf return $this; } - /** - * Assing a template variable - * - * @param string $key name of the variable within the template - * @param string $value replacement value - * @param bool $encode if true, special XML characters are encoded - * @throws OdfException - * @return odf - */ - public function setVarsHeadFooter($key, $value, $encode = true, $charset = 'ISO-8859') - { - $tag = $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT']; - // TODO Warning string may be: - // {aaa} - // instead of {aaa} so we should enhance this function. - //print $key.'-'.$value.'-'.strpos($this->contentXml, $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT']).'
'; - if (strpos($this->stylesXml, $tag) === false && strpos($this->stylesXml , $tag) === false) { - //if (strpos($this->contentXml, '">'. $key . '') === false) { - throw new OdfException("var $key not found in the document"); - //} - } - $value = $encode ? htmlspecialchars($value) : $value; - $value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value; - $this->vars[$tag] = str_replace("\n", "", $value); - return $this; - } - /** * Evaluating php codes inside the ODT and output the buffer (print, echo) inplace of the code * diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 2933bac2dbc..9193b8e103e 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -698,7 +698,7 @@ else $tmpcode=''; if (! empty($modCodeProduct->code_auto)) $tmpcode=$modCodeProduct->getNextValue($object,$type); - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; if ($_error) { print $langs->trans("RefAlreadyExists"); @@ -881,7 +881,7 @@ else print ''; // Ref - print ''; + print ''; // Label print ''; diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index af1dfea171b..efe4799bdee 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -7,6 +7,7 @@ * Copyright (C) 2013 Raphaël Doursenaud * Copyright (C) 2013 Jean Heimburger * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2013 Florian Henry * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -175,8 +176,8 @@ else } $sql .= natural_search($params, $snom); } - if (isset($tosell) && dol_strlen($tosell) > 0) $sql.= " AND p.tosell = ".$db->escape($tosell); - if (isset($tobuy) && dol_strlen($tobuy) > 0) $sql.= " AND p.tobuy = ".$db->escape($tobuy); + if (isset($tosell) && dol_strlen($tosell) > 0 && $tosell!=-1) $sql.= " AND p.tosell = ".$db->escape($tosell); + if (isset($tobuy) && dol_strlen($tobuy) > 0 && $tobuy!=-1) $sql.= " AND p.tobuy = ".$db->escape($tobuy); if (dol_strlen($canvas) > 0) $sql.= " AND p.canvas = '".$db->escape($canvas)."'"; if ($catid > 0) $sql.= " AND cp.fk_categorie = ".$catid; if ($catid == -2) $sql.= " AND cp.fk_categorie IS NULL"; @@ -297,8 +298,9 @@ else } if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print ''; if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print ''; - print_liste_field_titre($langs->trans("Sell"), $_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Buy"), $_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Sell"), $_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Buy"), $_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="center"',$sortfield,$sortorder); + print ''; print "\n"; // Lignes des champs de filtre @@ -354,8 +356,12 @@ else print ''; } - print ''; + + print ''; print ''; + print ''; // Status (to sell) - print ''; + print ''; + print ''; + print "\n"; $i++; } diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 104f92a84a9..a60deff921e 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -268,8 +268,11 @@ else // Country print ''; diff --git a/htdocs/user/index.php b/htdocs/user/index.php index d5b34808b8f..62ead1935eb 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -41,6 +41,8 @@ if ($user->societe_id > 0) $sall=GETPOST('sall','alpha'); $search_user=GETPOST('search_user','alpha'); +$search_statut=GETPOST('search_statut','alpha'); +if ($search_statut=='') $search_statut=1; // always display activ customer first $sortfield = GETPOST('sortfield','alpha'); $sortorder = GETPOST('sortorder','alpha'); @@ -55,6 +57,7 @@ if (! $sortorder) $sortorder="ASC"; $userstatic=new User($db); $companystatic = new Societe($db); +$form = new Form($db); /* @@ -86,6 +89,10 @@ if (! empty($search_user)) { $sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.lastname LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')"; } +if ($search_statut!='') +{ + $sql.= " AND (u.statut=".$search_statut.")"; +} if ($sall) $sql.= " AND (u.login LIKE '%".$db->escape($sall)."%' OR u.lastname LIKE '%".$db->escape($sall)."%' OR u.firstname LIKE '%".$db->escape($sall)."%' OR u.email LIKE '%".$db->escape($sall)."%' OR u.note LIKE '%".$db->escape($sall)."%')"; $sql.=$db->order($sortfield,$sortorder); @@ -95,6 +102,8 @@ if ($result) $num = $db->num_rows($result); $i = 0; + print ''."\n"; + $param="search_user=$search_user&sall=$sall"; print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").'
'.$langs->trans("Label").'
'.$langs->trans("DesiredStock").''.$langs->trans("PhysicalStock").' 
'; - print ' '; + print ''; + print $form->selectarray('tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')),$tosell,1); + print ''; + print $form->selectarray('tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'),'1'=>$langs->trans('ProductStatusOnBuyShort')),$tobuy,1); print ''; @@ -475,11 +481,13 @@ else } // Status (to buy) - print ''.$product_static->LibStatut($objp->tosell,5,0).''.$product_static->LibStatut($objp->tosell,5,0).''.$product_static->LibStatut($objp->tobuy,5,1).''.$product_static->LibStatut($objp->tobuy,5,1).' 
'.$langs->trans('Country').''; - $img=picto_from_langcode($object->country_code); - print ($img?$img.' ':''); + if (! empty($object->country_code)) + { + $img=picto_from_langcode($object->country_code); + print ($img?$img.' ':''); + } print $object->country; print '
'; print ''; @@ -104,7 +113,22 @@ if ($result) print_liste_field_titre($langs->trans("Company"),"index.php","u.fk_societe",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),"index.php","u.datec",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("LastConnexion"),"index.php","u.datelastlogin",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),"index.php","u.statut",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),"index.php","u.statut",$param,"",'align="center"',$sortfield,$sortorder); + print ''; + print "\n"; + + //SearchBar + print ''; + print ''; + + print ''; + + print ''; + print "\n"; $var=True; while ($i < $num) @@ -168,11 +192,13 @@ if ($result) // Statut $userstatic->statut=$obj->statut; - print ''; + print ''; + print ''; print "\n"; $i++; } print "
 
 '; + print $form->selectarray('search_statut', array('0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); + print ''; + print ''; + print '
'.$userstatic->getLibStatut(5).''.$userstatic->getLibStatut(5).' 
"; + print "\n"; $db->free($result); } else diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index a4538772e1a..126e4202018 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -113,7 +113,8 @@ $contact_fields = array( 'user_id' => array('name'=>'user_id','type'=>'xsd:string'), 'user_login' => array('name'=>'user_login','type'=>'xsd:string'), 'civility_id' => array('name'=>'civility_id','type'=>'xsd:string'), - 'poste' => array('name'=>'poste','type'=>'xsd:string') + 'poste' => array('name'=>'poste','type'=>'xsd:string'), + 'statut' => array('name'=>'statut','type'=>'xsd:string') //... ); //Retreive all extrafield for contact @@ -302,7 +303,8 @@ function getContact($authentication,$id,$ref='',$ref_ext='') 'user_id' => $contact->user_id, 'user_login' => $contact->user_login, 'civilite_id' => $contact->civility_id, - 'poste' => $contact->poste + 'poste' => $contact->poste, + 'statut' => $contact->statut ); //Retreive all extrafield for thirdsparty @@ -412,6 +414,7 @@ function createContact($authentication,$contact) $newobject->user_id=$contact['user_id']; $newobject->user_login=$contact['user_login']; $newobject->poste=$contact['poste']; + $newobject->statut=$contact['statut']; //Retreive all extrafield for thirdsparty // fetch optionals attributes and labels @@ -488,7 +491,7 @@ function getContactsForThirdParty($authentication,$idthirdparty) { $linesinvoice=array(); - $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civility_id, c.lastname, c.firstname,"; + $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civility_id, c.lastname, c.firstname, c.statut,"; $sql.= " c.address, c.zip, c.town,"; $sql.= " c.fk_pays as country_id,"; $sql.= " c.fk_departement,"; @@ -565,7 +568,8 @@ function getContactsForThirdParty($authentication,$idthirdparty) 'ref_commande' => $contact->ref_commande?$contact->ref_commande:'', 'ref_propal' => $contact->ref_propal?$contact->ref_propal:'', 'user_id' => $contact->user_id?$contact->user_id:'', - 'user_login' => $contact->no_email?$contact->user_login:'' + 'user_login' => $contact->user_login?$contact->user_login:'', + 'statut' => $contact->statut?$contact->statut:'' @@ -659,6 +663,8 @@ function updateContact($authentication,$contact) $object->civilite_id=$contact['civility_id']; $object->poste=$contact['poste']; + $object->statut=$contact['statut']; + //Retreive all extrafield for contact // fetch optionals attributes and labels