Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2013-05-25 17:15:17 +02:00
commit 8e1feba425
13 changed files with 62 additions and 46 deletions

View File

@ -23,10 +23,13 @@ To submit a snapshot for building, we should have a service file with content
<service name="download_src_package">
<param name="host">www.dolibarr.org</param>
<param name="protocol">http</param>
<param name="path">/files/lastbuild/package_rpm_generic/dolibarr-3.3.0-0.2.beta1.src.rpm</param>
<param name="path">/files/stable/package_rpm_generic/dolibarr-3.3.2-3.src.rpm</param>
</service>
</services>
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

View File

@ -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 != "")

View File

@ -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 != "")

View File

@ -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();

View File

@ -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

View File

@ -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
{

View File

@ -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 '<tr><td>'.$langs->trans('DateMaxPayment').'</td><td>';
$form->select_date($datedue,'ech','','','',"add",1,1);
print '</td></tr>';
// Project
if (! empty($conf->projet->enabled))
{

View File

@ -102,13 +102,14 @@ if ($object->fetch($id))
if ($object->fournisseur)
{
print '<tr>';
print '<tr>';
print '<td class="nowrap">'.$langs->trans("SupplierCode"). '</td><td colspan="3">';
print $object->code_fournisseur;
if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>';
print '</td>';
print '</tr>';
$langs->load('compta');
print '<tr>';
print '<td>';
print $form->editfieldkey("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer);

View File

@ -231,7 +231,9 @@ if ($resql)
$companystatic->nom=$objp->nom;
$companystatic->id=$objp->socid;
print '<td>'.$companystatic->getNomUrl(1,'supplier').'</td>';
print '<td>';
if ($companystatic->id > 0) print $companystatic->getNomUrl(1,'supplier');
print '</td>';
print '<td align="right">'.price($objp->price).'</td>';

View File

@ -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

View File

@ -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

View File

@ -931,7 +931,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
if (empty($disablehead))
{
print "<head>\n";
if (GETPOST('dol_basehref')) print '<base href="'.dol_escape_htmltag(GETPOST('dol_basehref')).'">'."\n";
// Displays meta
print '<meta name="robots" content="noindex,nofollow">'."\n"; // Evite indexation par robots
print '<meta name="author" content="Dolibarr Development Team">'."\n";

View File

@ -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)."'";