diff --git a/ChangeLog b/ChangeLog index 502cbc40536..5336bfd5878 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,8 @@ Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: [ bug #1526 ] Thumbs of files uploaded with dots in their names do not load correctly +Fix: Import ProfId1 to siren and ProfId2 to siret ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 8a1c8465759..55de5abffb4 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -957,12 +957,15 @@ if ($nboftargetok) { "$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM', "$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM' ); + use POSIX qw/strftime/; foreach my $file (sort keys %filestoscan) { $found=0; my $filesize = -s $file; + my $filedate = (stat $file)[9]; print $file." ".($filesize?"(found)":"(not found)"); print ($filesize?" - ".$filesize:""); + print ($filedate?" - ".strftime("%Y-%m-%d %H:%M:%S",localtime($filedate)):""); print "\n"; } diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index dd374eb1a6f..fe16e03b6c6 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -174,6 +174,7 @@ $(document).ready(function() { $now=dol_now(); $search_ref = GETPOST("search_ref"); +$search_refcustomer=GETPOST('search_refcustomer'); $search_societe = GETPOST("search_societe"); $search_montant_ht = GETPOST("search_montant_ht"); $search_montant_ttc = GETPOST("search_montant_ttc"); @@ -192,7 +193,7 @@ if (! $sortorder) $sortorder="ASC"; $limit = $conf->liste_limit; $sql = "SELECT s.nom, s.rowid as socid"; -$sql.= ", f.rowid as facid, f.facnumber, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.localtax1, f.localtax2, f.revenuestamp"; +$sql.= ", f.rowid as facid, f.facnumber, f.ref_client, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.localtax1, f.localtax2, f.revenuestamp"; $sql.= ", f.datef as df, f.date_lim_reglement as datelimite"; $sql.= ", f.paye as paye, f.fk_statut, f.type"; $sql.= ", sum(pf.amount) as am"; @@ -218,6 +219,7 @@ if (GETPOST('filtre')) } } if ($search_ref) $sql .= " AND f.facnumber LIKE '%".$db->escape($search_ref)."%'"; +if ($search_refcustomer) $sql .= " AND f.ref_client LIKE '%".$db->escape($search_refcustomer)."%'"; if ($search_societe) $sql .= " AND s.nom LIKE '%".$db->escape($search_societe)."%'"; if ($search_montant_ht) $sql .= " AND f.total = '".$db->escape($search_montant_ht)."'"; if ($search_montant_ttc) $sql .= " AND f.total_ttc = '".$db->escape($search_montant_ttc)."'"; @@ -246,6 +248,7 @@ if ($resql) $param.=(! empty($socid)?"&socid=".$socid:""); $param.=(! empty($option)?"&option=".$option:""); if ($search_ref) $param.='&search_ref='.urlencode($search_ref); + if ($search_refcustomer) $param.='&search_ref='.urlencode($search_refcustomer); if ($search_societe) $param.='&search_societe='.urlencode($search_societe); if ($search_montant_ht) $param.='&search_montant_ht='.urlencode($search_montant_ht); if ($search_montant_ttc) $param.='&search_montant_ttc='.urlencode($search_montant_ttc); @@ -274,6 +277,7 @@ if ($resql) print ''; print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"f.date_lim_reglement","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); @@ -291,6 +295,9 @@ if ($resql) // Ref print ''; + print ''; print ''; print ''; print ''; @@ -356,6 +363,11 @@ if ($resql) print "\n"; + // Customer ref + print ''; + print ''."\n"; print ''."\n"; @@ -402,7 +414,7 @@ if ($resql) } print ''; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 9ce484e5d43..d2cba220bcf 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -4,6 +4,7 @@ * Copyright (c) 2010 Juanjo Menent * Copyright (c) 2013 Charles-Fr BENKE * Copyright (C) 2013 Cédric Salvador + * Copyright (c) 2014 Marcos García * * 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 @@ -800,9 +801,10 @@ class FormFile // Preview if (empty($useinecm)) { + $fileinfo = pathinfo($file['name']); + print ''; diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 753e1a0892b..ab80004b0c7 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2012-2013 Juanjo Menent + * Copyright (C) 2012-2014 Juanjo Menent * * 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 @@ -382,7 +382,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='company'; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity = ".$conf->entity; $resql=$this->db->query($sql); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index a5c2d1e19fe..8561c815e38 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1416,8 +1416,8 @@ ConfirmDeleteLine=Are you sure you want to delete this line ? ##### Tax ##### TaxSetup=Taxes, social contributions and dividends module setup OptionVatMode=VAT due -OptionVATDefault=Standard -OptionVATDebitOption=Option services on Debit +OptionVATDefault=Cash basis +OptionVATDebitOption=Accrual basis OptionVatDefaultDesc=VAT is due:
- on delivery for goods (we use invoice date)
- on payments for services OptionVatDebitOptionDesc=VAT is due:
- on delivery for goods (we use invoice date)
- on invoice (debit) for services SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index ca7b2c4845b..a394b42686e 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -260,13 +260,15 @@ if ($result) print dol_print_date($db->jdate($objp->datef),'day').""; } else { + print '
\n"; + print $text.= ' - '.$objp->label; + print "\n"; + //print "\n"; } print "\n"; print "\n"; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index d7d5952ab66..59dbc487f74 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2847,15 +2847,15 @@ class Product extends CommonObject // On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites if ($photo_vignette && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i', $photo) && ($product->imgWidth > $maxWidth || $product->imgHeight > $maxHeight)) { - $return.= ''.img_picto($langs->trans('GenerateThumb'),'refresh').'  '; + $return.= ''.img_picto($langs->trans('GenerateThumb'),'refresh').'  '; } if ($user->rights->produit->creer || $user->rights->service->creer) { // Link to resize - $return.= ''.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','',1).'   '; + $return.= ''.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','',1).'   '; // Link to delete - $return.= ''; + $return.= ''; $return.= img_delete().''; } } @@ -2875,10 +2875,10 @@ class Product extends CommonObject if ($user->rights->produit->creer || $user->rights->service->creer) { // Link to resize - $return.= ''.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','',1).'   '; + $return.= ''.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','',1).'   '; // Link to delete - $return.= ''; + $return.= ''; $return.= img_delete().''; } } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 4075113d625..edc633a7fc8 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -217,12 +217,10 @@ foreach ($listofreferent as $key => $value) print_titre($langs->trans($title)); $selectList=$formproject->select_element($tablename,$project->societe->id); - if ($selectList<0) { + + if (!$selectList || ($selectList<0)) { setEventMessage($formproject->error,'errors'); - } - - if ($selectList) - { + } else { print ''; print ''; print ''; diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 9181c9b74f8..eda6e01f1f4 100644 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -471,6 +471,7 @@ form#login img {width:auto; height:auto; opacity:.7;} form#login img#img_logo { width:190px; max-width:190px; + max-height:100px; height:auto; border-radius:6px; padding:6px; diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index a118409890c..946f46ad141 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -550,6 +550,7 @@ form#login { } #img_logo { max-width: 200px; + max-height: 100px; } div.login_block { diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 4743e26ee8a..92d6b4f242f 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -583,6 +583,7 @@ form#login { } #img_logo { max-width: 200px; + max-height: 100px; } div.login_block { diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index ad03e369d95..8b4172522aa 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -654,6 +654,7 @@ form#login { } #img_logo { max-width: 200px; + max-height: 100px; } div.login_block { diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index fd2c8a17252..c4e9b87ff44 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -867,6 +867,7 @@ table.login_table tr td table.none tr td { } #img_logo { max-width: 200px; + max-height: 100px; } div.login_block {
'; print ''; + print ''; + print '  '; + print $objp->ref_client; + print ''.dol_print_date($db->jdate($objp->df),'day').''.dol_print_date($db->jdate($objp->datelimite),'day').'
'.$langs->trans("Total").''.$langs->trans("Total").''.price($total_ht).''.price($total_tva).''.price($total_ttc).''; - $tmp=explode('.',$file['name']); - $minifile=$tmp[0].'_mini.'.strtolower($tmp[1]); // Thumbs are created with filename in lower case + $minifile=$fileinfo['filename'].'_mini.'.$fileinfo['extension']; // Thumbs are created with filename in lower case if (image_format_supported($file['name']) > 0) print ''; else print ' '; print ''; $product_static->type=$objp->fk_product_type; - $product_static->id=$objp->fk_product; + $product_static->id=$objp->rowid; $product_static->ref=$objp->ref; $product_static->libelle=$objp->label; $text=$product_static->getNomUrl(1); - $text.= ' - '.$objp->label; - print "".$product_static->getNomUrl(1)."".$product_static->getNomUrl(1)."".price($pv, null, null, null, null, $rounding)."".price($pa, null, null, null, null, $rounding)."