diff --git a/build/obs/README b/build/obs/README index 24a6df2e84b..8b3ea336dc1 100644 --- a/build/obs/README +++ b/build/obs/README @@ -23,10 +23,13 @@ To submit a snapshot for building, we should have a service file with content www.dolibarr.org http - /files/lastbuild/package_rpm_generic/dolibarr-3.3.0-0.2.beta1.src.rpm + /files/stable/package_rpm_generic/dolibarr-3.3.2-3.src.rpm How to have such a service ? -Try to make "Add file" and select Remote URL and enter http://www.dolibarr.org/files/lastbuild/package_rpm_generic/dolibarr-3.3.0-0.2.beta1.src.rpm +Try to make "Add file" and select Remote URL and enter http://www.dolibarr.org/files/stable/package_rpm_generic/dolibarr-3.3.2-3.src.rpm +Then add into advanded - attributes +OBS:Screenshots http://www.dolibarr.org/images/phocagallery/dolibarr_screenshot1.png +OBS:QualityCategory Testing \ No newline at end of file diff --git a/htdocs/core/db/mysql.class.php b/htdocs/core/db/mysql.class.php index 4868fb81642..287fba04bcc 100644 --- a/htdocs/core/db/mysql.class.php +++ b/htdocs/core/db/mysql.class.php @@ -879,30 +879,33 @@ class DoliDBMysql { // cles recherchees dans le tableau des descriptions (fields) : type,value,attribute,null,default,extra // ex. : $fields['rowid'] = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment'); - $sql = "create table ".$table."("; + $sql = "CREATE TABLE ".$table."("; $i=0; foreach($fields as $field_name => $field_desc) { $sqlfields[$i] = $field_name." "; $sqlfields[$i] .= $field_desc['type']; - if( preg_match("/^[^\s]/i",$field_desc['value'])) + if( preg_match("/^[^\s]/i",$field_desc['value'])) { $sqlfields[$i] .= "(".$field_desc['value'].")"; - if( preg_match("/^[^\s]/i",$field_desc['attribute'])) + } + if( preg_match("/^[^\s]/i",$field_desc['attribute'])) { $sqlfields[$i] .= " ".$field_desc['attribute']; + } if( preg_match("/^[^\s]/i",$field_desc['default'])) { - if(preg_match("/null/i",$field_desc['default'])) + if ((preg_match("/null/i",$field_desc['default'])) || (preg_match("/CURRENT_TIMESTAMP/i",$field_desc['default']))) { $sqlfields[$i] .= " default ".$field_desc['default']; - elseif ($field_desc['default'] == 'CURRENT_TIMESTAMP') - $sqlfields[$i] .= " default ".$field_desc['default']; - else + } + else { $sqlfields[$i] .= " default '".$field_desc['default']."'"; + } } - if( preg_match("/^[^\s]/i",$field_desc['null'])) + if( preg_match("/^[^\s]/i",$field_desc['null'])) { $sqlfields[$i] .= " ".$field_desc['null']; - - if( preg_match("/^[^\s]/i",$field_desc['extra'])) + } + if( preg_match("/^[^\s]/i",$field_desc['extra'])) { $sqlfields[$i] .= " ".$field_desc['extra']; + } $i++; } if($primary_key != "") diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index e7ccebbd0ee..2ae51e7def5 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -873,33 +873,33 @@ class DoliDBMysqli { // cles recherchees dans le tableau des descriptions (fields) : type,value,attribute,null,default,extra // ex. : $fields['rowid'] = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment'); - $sql = "create table ".$table."("; + $sql = "CREATE TABLE ".$table."("; $i=0; foreach($fields as $field_name => $field_desc) { - $sqlfields[$i] = $field_name." "; - $sqlfields[$i] .= $field_desc['type']; - - if( preg_match("/^[^\s]/i",$field_desc['value'])) - $sqlfields[$i] .= "(".$field_desc['value'].")"; - - if( preg_match("/^[^\s]/i",$field_desc['attribute'])) - $sqlfields[$i] .= " ".$field_desc['attribute']; - - if( preg_match("/^[^\s]/i",$field_desc['default'])) - { - if(preg_match("/null/i",$field_desc['default'])) - $sqlfields[$i] .= " default ".$field_desc['default']; - elseif ($field_desc['default'] == 'CURRENT_TIMESTAMP') - $sqlfields[$i] .= " default ".$field_desc['default']; - else - $sqlfields[$i] .= " default '".$field_desc['default']."'"; - } - if( preg_match("/^[^\s]/i",$field_desc['null'])) - $sqlfields[$i] .= " ".$field_desc['null']; - - if( preg_match("/^[^\s]/i",$field_desc['extra'])) - $sqlfields[$i] .= " ".$field_desc['extra']; + $sqlfields[$i] = $field_name." "; + $sqlfields[$i] .= $field_desc['type']; + if( preg_match("/^[^\s]/i",$field_desc['value'])) { + $sqlfields[$i] .= "(".$field_desc['value'].")"; + } + if( preg_match("/^[^\s]/i",$field_desc['attribute'])) { + $sqlfields[$i] .= " ".$field_desc['attribute']; + } + if( preg_match("/^[^\s]/i",$field_desc['default'])) + { + if ((preg_match("/null/i",$field_desc['default'])) || (preg_match("/CURRENT_TIMESTAMP/i",$field_desc['default']))) { + $sqlfields[$i] .= " default ".$field_desc['default']; + } + else { + $sqlfields[$i] .= " default '".$field_desc['default']."'"; + } + } + if( preg_match("/^[^\s]/i",$field_desc['null'])) { + $sqlfields[$i] .= " ".$field_desc['null']; + } + if( preg_match("/^[^\s]/i",$field_desc['extra'])) { + $sqlfields[$i] .= " ".$field_desc['extra']; + } $i++; } if($primary_key != "") diff --git a/htdocs/core/get_menudiv.php b/htdocs/core/get_menudiv.php index 0f1da52c46e..f320b7cc8eb 100644 --- a/htdocs/core/get_menudiv.php +++ b/htdocs/core/get_menudiv.php @@ -45,6 +45,8 @@ $left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); * View */ +$title=$langs->trans("Menu"); + // URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests $arrayofjs=array(); $arrayofcss=array(); diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 5ebff71df0c..71f4ebfd542 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -296,7 +296,7 @@ class modFournisseur extends DolibarrModules $this->export_icon[$r]='order'; $this->export_permission[$r]=array(array("fournisseur","commande","export")); $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.note'=>"Note",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array(); // TODO add fields type + $this->export_TypeFields_array[$r]=array('s.rowid'=>"company",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.idprof5'=>'Text','s.idprof6'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.date_creation'=>"Date",'f.date_commande'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Number",'fd.qty'=>"Number",'fd.remise_percent'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.total_tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"order",'f.ref'=>"order",'f.ref_supplier'=>"order",'f.date_creation'=>"order",'f.date_commande'=>"order",'f.total_ht'=>"order",'f.total_ttc'=>"order",'f.tva'=>"order",'f.fk_statut'=>'order','f.note'=>"order",'fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('order_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index d1526e04984..abdb1006266 100755 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -68,7 +68,7 @@ $conffiletoshow = "htdocs/conf/conf.php"; // Include configuration -$result=include_once $conffile; +$result=@include_once $conffile; // Keep @ because with some error reporting this break the redirect if (! $result && ! empty($_SERVER["GATEWAY_INTERFACE"])) // If install not done and we are in a web session { diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index d4010f6c495..3a157d74ceb 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -95,7 +95,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes') $result=$object->createFromClone($id); if ($result > 0) { - header("Location: ".$_SERVER['PHP_SELF'].'?action=editfacnumber&id='.$result); + header("Location: ".$_SERVER['PHP_SELF'].'?action=editref_supplier&id='.$result); exit; } else @@ -1158,7 +1158,7 @@ if ($action == 'create') print ''.$langs->trans('DateMaxPayment').''; $form->select_date($datedue,'ech','','','',"add",1,1); print ''; - + // Project if (! empty($conf->projet->enabled)) { diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 3fcfa4b7a86..38ce1e648b3 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -102,13 +102,14 @@ if ($object->fetch($id)) if ($object->fournisseur) { - print ''; + print ''; print ''.$langs->trans("SupplierCode"). ''; print $object->code_fournisseur; if ($object->check_codefournisseur() <> 0) print ' ('.$langs->trans("WrongSupplierCode").')'; print ''; print ''; + $langs->load('compta'); print ''; print ''; print $form->editfieldkey("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer); diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index fc35d0a8057..3f8b3ed0353 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -231,7 +231,9 @@ if ($resql) $companystatic->nom=$objp->nom; $companystatic->id=$objp->socid; - print ''.$companystatic->getNomUrl(1,'supplier').''; + print ''; + if ($companystatic->id > 0) print $companystatic->getNomUrl(1,'supplier'); + print ''; print ''.price($objp->price).''; diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 2f252d39923..f8e1d1fa780 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -13,6 +13,7 @@ CashDeskProducts=Products CashDeskStock=Stock CashDeskOn=on CashDeskThirdParty=Third party +CashdeskDashboard=Point of sale access ShoppingCart=Shopping cart NewSell=New sell BackOffice=Back office diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index 5c59db99c57..6eab6e5b3d0 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -13,6 +13,7 @@ CashDeskProducts=Produits CashDeskStock=Stock CashDeskOn=de CashDeskThirdParty=Tiers +CashdeskDashboard=Accès Point de vente ShoppingCart=Panier NewSell=Nouvelle vente BackOffice=Back office diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index df7ae4d4c43..c1aa388507c 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -931,7 +931,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs if (empty($disablehead)) { print "\n"; - + if (GETPOST('dol_basehref')) print ''."\n"; // Displays meta print ''."\n"; // Evite indexation par robots print ''."\n"; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 54aff2226a6..7e884a5c10a 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1113,7 +1113,10 @@ class User extends CommonObject $this->note = trim($this->note); $this->openid = trim(empty($this->openid)?'':$this->openid); // Avoid warning $this->admin = $this->admin?$this->admin:0; - + $this->address = empty($this->address)?'':$this->address; + $this->zip = empty($this->zip)?'':$this->zip; + $this->town = empty($this->town)?'':$this->town; + // Check parameters if (! empty($conf->global->USER_MAIL_REQUIRED) && ! isValidEMail($this->email)) { @@ -1133,8 +1136,8 @@ class User extends CommonObject $sql.= ", address = '".$this->db->escape($this->address)."'"; $sql.= ", zip = '".$this->db->escape($this->zip)."'"; $sql.= ", town = '".$this->db->escape($this->town)."'"; - $sql.= ", fk_state = ".($this->state_id > 0?"'".$this->db->escape($this->state_id)."'":"null"); - $sql.= ", fk_country = ".($this->country_id > 0?"'".$this->db->escape($this->country_id)."'":"null"); + $sql.= ", fk_state = ".((! empty($this->state_id) && $this->state_id > 0)?"'".$this->db->escape($this->state_id)."'":"null"); + $sql.= ", fk_country = ".((! empty($this->country_id) && $this->country_id > 0)?"'".$this->db->escape($this->country_id)."'":"null"); $sql.= ", office_phone = '".$this->db->escape($this->office_phone)."'"; $sql.= ", office_fax = '".$this->db->escape($this->office_fax)."'"; $sql.= ", user_mobile = '".$this->db->escape($this->user_mobile)."'";