From f7fff8ecb350ded47985ea9083dc3a586eeffc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Tue, 11 Sep 2012 12:40:08 +0200 Subject: [PATCH 001/152] Added missing translations removed in PR #371 --- htdocs/langs/ca_ES/admin.lang | 9 ++++++++- htdocs/langs/es_ES/admin.lang | 11 ++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index 63074a981d0..8e61f05950f 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -1,5 +1,6 @@ # Dolibarr language file - ca_ES - admin CHARSET=UTF-8 +Foundation=Fundació Version=Versió VersionProgram=Versió programa VersionLastInstall=Versió instal·lació inicial @@ -61,6 +62,7 @@ PreviewNotAvailable=Vista prèvia no disponible ThemeCurrentlyActive=Tema actualment actiu CurrentTimeZone=Fus horari PHP (Servidor) Space=Àrea +Table=Taula Fields=Camps Mask=Màscara NextValue=Pròxim valor @@ -128,6 +130,7 @@ SystemInfo=Info. sistema SystemTools=Utilitats sistema SystemToolsArea=Àrea utilitats del sistema SystemToolsAreaDesc=Aquesta àrea ofereix diverses funcions d'administració. Utilitzeu el menú per triar la funcionalitat cercada. +Purge=Purgar PurgeAreaDesc=Aquesta pàgina li permet eliminar tots els arxius creats o guardats per Dolibarr (arxius temporals o tots els fitxers de la carpeta %s). L'ús d'aquesta funció no és necessària. Es dóna per als usuaris que alberguen Dolibarr en un servidor que no ofereix els permisos d'eliminació d'arxius salvaguardat pel servidor web. PurgeDeleteLogFile=Esborrar el fitxer log %s definit pel mòdul Syslog (no hi ha risc de pèrdua de dades) PurgeDeleteTemporaryFiles=Eliminar tots els arxius temporals (sense risc de pèrdua de dades) @@ -156,6 +159,7 @@ ImportPostgreSqlDesc=Per a importar una còpia de seguretat, useu l'ordre pg_res ImportMySqlCommand=%s %s < elmeuarxiubackup.sql ImportPostgreSqlCommand=%s %s elmeuarxiubackup.sql FileNameToGenerate=Nom del fitxer a generar +Compression=Compressió CommandsToDisableForeignKeysForImport=Comanda per desactivar les claus excloents a la importació CommandsToDisableForeignKeysForImportWarning=Obligatori si vol poder restaurar més tard el dump SQL ExportCompatibility=Compatibilitat de l'arxiu d'exportació generat @@ -167,7 +171,7 @@ FullPathToPostgreSQLdumpCommand=ruta completa cap al comandament pg_dump ExportOptions=Opcions d'exportació AddDropDatabase=Afegir ordres DROP DATABASE AddDropTable=Afegir ordres DROP TABLE -Structure=Estructura +ExportStructure=Estructura Datas=Dades NameColumn=Nom de les columnes ExtendedInsert=Instruccions INSERT esteses @@ -446,6 +450,7 @@ Module2600Name=WebServices Module2600Desc=Activa els serveis de servidor web services de Dolibarr Module2700Name=Gravatar Module2700Desc=Utilitza el servei en línia de Gravatar (www.gravatar.com) per mostrar fotos dels usuaris/membres (que es troben en els seus missatges de correu electrònic). Necessita un accés a Internet +Module2800Desc=Client FTP Module2900Name=GeoIPMaxmind Module2900Desc=Capacitats de conversió GeoIP Maxmind Module5000Name=Multi-empresa @@ -739,6 +744,8 @@ PhpConf=Conf PhpWebLink=Enllaç Web-PHP Pear=Pear PearPackages=Paquets Pear +Browser=Navegador +Server=Servidor Database=Base de dades DatabaseServer=Host de la base de dades DatabaseName=Nom de la base de dades diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 0e15d03b8d8..bebbcaabf3c 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -1,5 +1,6 @@ # Dolibarr language file - es_ES - admin CHARSET=UTF-8 +Foundation=Fundación Version=Versión VersionProgram=Versión programa VersionLastInstall=Versión instalación inicial @@ -61,7 +62,9 @@ PreviewNotAvailable=Vista previa no disponible ThemeCurrentlyActive=Tema actualmente activo CurrentTimeZone=Zona horaria PHP (Servidor) Space=Área +Table=Tabla Fields=Campos +Index=Índice Mask=Máscara NextValue=Próximo valor NextValueForInvoices=Próximo valor (facturas) @@ -128,6 +131,7 @@ SystemInfo=Info. sistema SystemTools=Utilidades sistema SystemToolsArea=Área utilidades del sistema SystemToolsAreaDesc=Esta área ofrece distintas funciones de administración. Utilice la menú para elegir la funcionalidad buscada. +Purge=Purgar PurgeAreaDesc=Esta página le permite eliminar todos los archivos creados o guardados por Dolibarr (archivos temporales o todos los archivos del directorio %s). El uso de esta función no es necesaria. Se proporciona para los usuarios que albergan a Dolibarr en un servidor que no ofrece los permisos de eliminación de archivos salvaguardados por el servidor Web. PurgeDeleteLogFile=Borrar el archivo log %s definido por el módulo Syslog (no hay riesgo de pérdida de datos) PurgeDeleteTemporaryFiles=Eliminar todos los archivos temporales (sin riesgo de perdida de datos) @@ -156,6 +160,7 @@ ImportPostgreSqlDesc=Para importar una copia de seguridad, debe usar el comando ImportMySqlCommand=%s %s < miarchivobackup.sql ImportPostgreSqlCommand=%s %s miarchivobackup.sql FileNameToGenerate=Nombre del archivo a generar +Compression=Compresión CommandsToDisableForeignKeysForImport=Comando para desactivar las claves excluyentes a la importación CommandsToDisableForeignKeysForImportWarning=Obligatorio si quiere poder restaurar más tarde el dump SQL ExportCompatibility=Compatibilidad del archivo de exportación generado @@ -167,7 +172,7 @@ FullPathToPostgreSQLdumpCommand=ruta completa hacia el comando pg_dump ExportOptions=Opciones de exportación AddDropDatabase=Añadir órdenes DROP DATABASE AddDropTable=Añadir órdenes DROP TABLE -Structure=Estructura +ExportStructure=Estructura Datas=Datos NameColumn=Nombre las columnas ExtendedInsert=Instrucciones INSERT extendidas @@ -446,6 +451,7 @@ Module2600Name=WebServices Module2600Desc=Activa los servicios de servidor web services de Dolibarr Module2700Name=Gravatar Module2700Desc=Utiliza el servicio en línea de Gravatar (www.gravatar.com) para mostrar fotos de los usuarios/miembros (que se encuentran en sus mensajes de correo electrónico). Necesita un acceso a Internet +Module2800Desc=Cliente FTP Module2900Name=GeoIPMaxmind Module2900Desc=Capacidades de conversión GeoIP Maxmind Module5000Name=Multi-empresa @@ -739,6 +745,8 @@ PhpConf=Conf PhpWebLink=Vínculo Web-PHP Pear=Pear PearPackages=Paquetes Pear +Browser=Navegador +Server=Servidor Database=Base de datos DatabaseServer=Host de la base de datos DatabaseName=Nombre de la base de datos @@ -789,6 +797,7 @@ CompanyZip=Código postal CompanyTown=Población CompanyCountry=País CompanyCurrency=Divisa principal +Logo=Logotipo DoNotShow=No mostrar DoNotSuggestPaymentMode=No sugerir NoActiveBankAccountDefined=Ninguna cuenta bancaria activa definida From d3eed9f15ee87886100456a945aaf1f249bb230f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Tue, 11 Sep 2012 12:43:15 +0200 Subject: [PATCH 002/152] Removed '=undefined' from translation files --- htdocs/langs/ca_ES/companies.lang | 4 +- htdocs/langs/ca_ES/dict.lang | 4 +- htdocs/langs/ca_ES/interventions.lang | 4 +- htdocs/langs/ca_ES/propal.lang | 2 +- htdocs/langs/da_DK/main.lang | 218 +++++++++++++------------- htdocs/langs/es_ES/errors.lang | 2 +- htdocs/langs/fi_FI/main.lang | 218 +++++++++++++------------- htdocs/langs/pl_PL/main.lang | 218 +++++++++++++------------- htdocs/langs/pt_BR/companies.lang | 2 +- htdocs/langs/pt_BR/contracts.lang | 2 +- htdocs/langs/pt_PT/companies.lang | 2 +- htdocs/langs/pt_PT/contracts.lang | 2 +- 12 files changed, 339 insertions(+), 339 deletions(-) diff --git a/htdocs/langs/ca_ES/companies.lang b/htdocs/langs/ca_ES/companies.lang index 74579bdc876..cfd42da2d18 100644 --- a/htdocs/langs/ca_ES/companies.lang +++ b/htdocs/langs/ca_ES/companies.lang @@ -374,7 +374,7 @@ UniqueThirdParties=Total de tercers únics InActivity=Actiu ActivityCeased=Tancat ActivityStateFilter=Estat d'activitat -# Monkey=undefined +# Monkey MonkeyNumRefModelDesc=Retorna un número sota el format %syymm-nnnn per als codis de clients i %syymm-nnnn per als codis dels proveïdors, on yy és l'any, mm el mes i nnnn un comptador seqüencial sense ruptura i sense tornar a 0. -# Leopard=undefined +# Leopard LeopardNumRefModelDesc=Codi de client/proveïdor lliure sense verificació. Pot ser modificat en qualsevol moment. diff --git a/htdocs/langs/ca_ES/dict.lang b/htdocs/langs/ca_ES/dict.lang index 30c5c6466e6..0ab12a2e38c 100644 --- a/htdocs/langs/ca_ES/dict.lang +++ b/htdocs/langs/ca_ES/dict.lang @@ -246,13 +246,13 @@ CountryJE=Jersey CountryME=Monténégro CountryBL=Saint-Barthélemy CountryMF=Saint-Martin -##### Civilities #####=undefined +##### Civilities ##### CivilityMME=Senyora CivilityMR=Senyor CivilityMLE=Senyoreta CivilityMTRE=En CivilityDR=Doctor -##### Currencies #####=undefined +##### Currencies ##### Currencyeuros=Euros CurrencyAUD=Dòlars Aus. CurrencySingAUD=Dòlar Aus. diff --git a/htdocs/langs/ca_ES/interventions.lang b/htdocs/langs/ca_ES/interventions.lang index 01d4027d7f6..3344661a2b4 100644 --- a/htdocs/langs/ca_ES/interventions.lang +++ b/htdocs/langs/ca_ES/interventions.lang @@ -40,12 +40,12 @@ ClassifyBilled=Classificar "Facturado" StatusInterInvoiced=Facturado RelatedInterventions=Intervencions adjuntes ShowIntervention=Mostrar intervenció -##### Types de contacts #####=undefined +##### Types de contacts ##### TypeContact_fichinter_internal_INTERREPFOLL=Responsable seguiment de la intervenció TypeContact_fichinter_internal_INTERVENING=Interventor TypeContact_fichinter_external_BILLING=Contacte client facturació intevenció TypeContact_fichinter_external_CUSTOMER=Contacte client seguiment intervenció -# Modele numérotation=undefined +# Modele numérotation ArcticNumRefModelDesc1=Model de numeració genèric ArcticNumRefModelError=Activació impossible PacificNumRefModelDesc1=Retorna el número amb el format %syymm-nnnn on yy és l'any, mm. el mes i nnnn un comptador seqüencial sense ruptura i sense quedar a 0 diff --git a/htdocs/langs/ca_ES/propal.lang b/htdocs/langs/ca_ES/propal.lang index 16c641102a9..7aa87dcc429 100644 --- a/htdocs/langs/ca_ES/propal.lang +++ b/htdocs/langs/ca_ES/propal.lang @@ -92,7 +92,7 @@ AvailabilityTypeAV_1M=1 mes TypeContact_propal_internal_SALESREPFOLL=Comercial seguiment pressupost TypeContact_propal_external_BILLING=Contacte client de facturació pressupost TypeContact_propal_external_CUSTOMER=Contacte client seguiment pressupost -# Documents models=undefined +# Documents models DocModelAzurDescription=Model de pressupost complet (logo...) DocModelJauneDescription=Model de pressupost Jaune Numbershort=Nº \ No newline at end of file diff --git a/htdocs/langs/da_DK/main.lang b/htdocs/langs/da_DK/main.lang index e48fd0420a8..7dd615bfa86 100644 --- a/htdocs/langs/da_DK/main.lang +++ b/htdocs/langs/da_DK/main.lang @@ -571,112 +571,112 @@ Day0=Søndag // Reference language: en_US ErrorGoToGlobalSetup=Gå til 'Company / Foundation "-opsætningen til at løse dette // STOP - Lines generated via autotranslator.php tool (2009-08-19 20:57:56). - - -// START - Lines generated via autotranslator.php tool (2010-07-17 11:19:38). -// Reference language: en_US -FormatHourShortDuration=%H:%M -NoError=Ingen fejl -ErrorNoSocialContributionForSellerCountry=Fejl, ingen social bidrag type der er defineret for landets %s '. -BackgroundColorByDefault=Standard baggrundsfarve -FileWasNotUploaded=En fil er valgt for udlæg, men endnu ikke var uploadet. Klik på "Vedhæft fil" for dette. -NbOfEntries=Nb af tilmeldinger -Resize=Resize -Recenter=Recenter -NumberByMonth=Antal efter måned -KiloBytes=Kilobyte -MegaBytes=Megabyte -GigaBytes=Gigabyte -b=b. -Kb=Kb -Mb=Mb -Gb=Gb -AmountLT1ES=Beløb RE -AmountLT2ES=Beløb IRPF -TotalLT1ES=Total RE -TotalLT2ES=Total IRPF -Available=Tilgængelig -Examples=Eksempler -Reason=Årsag -SendByMail=Send via e-mail -DocumentsNb=Linkede filer (%s) -PrintContentArea=Vis side for at udskrive hovedindhold område -NoMenu=Ingen sub-menu -WarningYouAreInMaintenanceMode=Advarsel, du er i en vedligeholdelses mode, så kun login %s er tilladt at bruge ansøgningen på i øjeblikket. -CreditCard=Kreditkort -FieldsWithAreMandatory=Felter med %s er obligatoriske -FieldsWithIsForPublic=Felter med %s er vist på offentlig liste over medlemmer. Hvis du ikke ønsker dette, se "offentlige" boks. -AccordingToGeoIPDatabase=(Ifølge GeoIP konvertering) -Line=Line -NotSupported=Ikke understøttet -RequiredField=Obligatorisk felt -Result=Resultat -ToTest=Test -ValidateBefore=Kortet skal være valideret, før du bruger denne funktion -Visibility=Synlighed -Private=Private -Hidden=Skjulte -Resources=Ressourcer -Source=Kilde -Prefix=Præfiks -// STOP - Lines generated via autotranslator.php tool (2010-07-17 11:21:47). - - -// START - Lines generated via autotranslator.php tool (2012-02-29 15:59:19). -// Reference language: en_US -> da_DK -FormatDateShortJQuery=dd/mm/yy -AddLink=Tilføj link -Of=af -SearchOf=Søg -AmountByMonth=Beløb efter måned -DatePayment=Dato for betaling -TeraBytes=Terabyte -Tb=Tb -LT1ES=RE -LT2ES=IRPF -OtherStatistics=Andre statistik -ActionNotApplicable=Ikke relevant -ActionsOnMember=Events Om dette medlem -JanuaryMin=Jan -FebruaryMin=Februar -MarchMin=Mar -AprilMin=April -MayMin=Maj -JuneMin=Juni -JulyMin=Juli -AugustMin=August -SeptemberMin=September -OctoberMin=Oktober -NovemberMin=November -DecemberMin=December -CoreErrorTitle=Systemfejl -CoreErrorMessage=Beklager, der opstod en fejl. Kontroller logs, eller kontakt din systemadministrator. -Before=Før -After=Efter -IPAddress=IP-adressen -Frequency=Frekvens -IM=Instant messaging -NewAttribute=Ny attribut -AttributeCode=Attribut koden -OptionalFieldsSetup=Ekstra attributter opsætning -URLPhoto=Url af foto / logo -SetLinkToThirdParty=Link til en anden tredjepart -CreateDraft=Opret udkast -ClickToEdit=Klik for at redigere -ObjectDeleted=Objekt %s slettet -ByCountry=Efter land -ByTown=Ved byen -ByDate=Efter dato -ByMonthYear=Efter måned / år -ByYear=Ved år -ByMonth=efter måned -ByDay=Ved dag -BySalesRepresentative=Ved salgsrepræsentant -MondayMin=Mo -TuesdayMin=Tu -WednesdayMin=Vi -ThursdayMin=Th -FridayMin=Fr -SaturdayMin=Sa -SundayMin=Su -// STOP - Lines generated via autotranslator.php tool (2012-02-29 16:01:49). + + +// START - Lines generated via autotranslator.php tool (2010-07-17 11:19:38). +// Reference language: en_US +FormatHourShortDuration=%H:%M +NoError=Ingen fejl +ErrorNoSocialContributionForSellerCountry=Fejl, ingen social bidrag type der er defineret for landets %s '. +BackgroundColorByDefault=Standard baggrundsfarve +FileWasNotUploaded=En fil er valgt for udlæg, men endnu ikke var uploadet. Klik på "Vedhæft fil" for dette. +NbOfEntries=Nb af tilmeldinger +Resize=Resize +Recenter=Recenter +NumberByMonth=Antal efter måned +KiloBytes=Kilobyte +MegaBytes=Megabyte +GigaBytes=Gigabyte +b=b. +Kb=Kb +Mb=Mb +Gb=Gb +AmountLT1ES=Beløb RE +AmountLT2ES=Beløb IRPF +TotalLT1ES=Total RE +TotalLT2ES=Total IRPF +Available=Tilgængelig +Examples=Eksempler +Reason=Årsag +SendByMail=Send via e-mail +DocumentsNb=Linkede filer (%s) +PrintContentArea=Vis side for at udskrive hovedindhold område +NoMenu=Ingen sub-menu +WarningYouAreInMaintenanceMode=Advarsel, du er i en vedligeholdelses mode, så kun login %s er tilladt at bruge ansøgningen på i øjeblikket. +CreditCard=Kreditkort +FieldsWithAreMandatory=Felter med %s er obligatoriske +FieldsWithIsForPublic=Felter med %s er vist på offentlig liste over medlemmer. Hvis du ikke ønsker dette, se "offentlige" boks. +AccordingToGeoIPDatabase=(Ifølge GeoIP konvertering) +Line=Line +NotSupported=Ikke understøttet +RequiredField=Obligatorisk felt +Result=Resultat +ToTest=Test +ValidateBefore=Kortet skal være valideret, før du bruger denne funktion +Visibility=Synlighed +Private=Private +Hidden=Skjulte +Resources=Ressourcer +Source=Kilde +Prefix=Præfiks +// STOP - Lines generated via autotranslator.php tool (2010-07-17 11:21:47). + + +// START - Lines generated via autotranslator.php tool (2012-02-29 15:59:19). +// Reference language: en_US -> da_DK +FormatDateShortJQuery=dd/mm/yy +AddLink=Tilføj link +Of=af +SearchOf=Søg +AmountByMonth=Beløb efter måned +DatePayment=Dato for betaling +TeraBytes=Terabyte +Tb=Tb +LT1ES=RE +LT2ES=IRPF +OtherStatistics=Andre statistik +ActionNotApplicable=Ikke relevant +ActionsOnMember=Events Om dette medlem +JanuaryMin=Jan +FebruaryMin=Februar +MarchMin=Mar +AprilMin=April +MayMin=Maj +JuneMin=Juni +JulyMin=Juli +AugustMin=August +SeptemberMin=September +OctoberMin=Oktober +NovemberMin=November +DecemberMin=December +CoreErrorTitle=Systemfejl +CoreErrorMessage=Beklager, der opstod en fejl. Kontroller logs, eller kontakt din systemadministrator. +Before=Før +After=Efter +IPAddress=IP-adressen +Frequency=Frekvens +IM=Instant messaging +NewAttribute=Ny attribut +AttributeCode=Attribut koden +OptionalFieldsSetup=Ekstra attributter opsætning +URLPhoto=Url af foto / logo +SetLinkToThirdParty=Link til en anden tredjepart +CreateDraft=Opret udkast +ClickToEdit=Klik for at redigere +ObjectDeleted=Objekt %s slettet +ByCountry=Efter land +ByTown=Ved byen +ByDate=Efter dato +ByMonthYear=Efter måned / år +ByYear=Ved år +ByMonth=efter måned +ByDay=Ved dag +BySalesRepresentative=Ved salgsrepræsentant +MondayMin=Mo +TuesdayMin=Tu +WednesdayMin=Vi +ThursdayMin=Th +FridayMin=Fr +SaturdayMin=Sa +SundayMin=Su +// STOP - Lines generated via autotranslator.php tool (2012-02-29 16:01:49). diff --git a/htdocs/langs/es_ES/errors.lang b/htdocs/langs/es_ES/errors.lang index 0e075b716b1..b238a2d3802 100644 --- a/htdocs/langs/es_ES/errors.lang +++ b/htdocs/langs/es_ES/errors.lang @@ -1,7 +1,7 @@ # Dolibarr language file - es_ES - errors CHARSET=UTF-8 MenuManager=Gestor de menú -# Errors=undefined +# Errors Error=Error Errors=Errores ErrorBadEMail=e-mail %s no correcto diff --git a/htdocs/langs/fi_FI/main.lang b/htdocs/langs/fi_FI/main.lang index 9bcde927f2a..734a3356dd9 100644 --- a/htdocs/langs/fi_FI/main.lang +++ b/htdocs/langs/fi_FI/main.lang @@ -563,112 +563,112 @@ Day5=Perjantai Day6=Lau Day0=Sunnuntai // STOP - Lines generated via autotranslator.php tool (2009-08-13 20:45:19). - - -// START - Lines generated via autotranslator.php tool (2010-07-17 11:26:22). -// Reference language: en_US -FormatHourShortDuration=%H:%M -NoError=Ei virheitä -ErrorNoSocialContributionForSellerCountry=Virhe, ei sosiaaliturvamaksujen tyyppi määritellään maan %s ". -BackgroundColorByDefault=Default taustaväri -FileWasNotUploaded=Tiedosto on valittu liite mutta ei ollut vielä ladattu. Klikkaa "Liitä tiedosto" tätä. -NbOfEntries=Huom Merkintöjen -Resize=Asua -Recenter=Keskitä -NumberByMonth=Numero kuukausittain -KiloBytes=Kilotavua -MegaBytes=Megatavua -GigaBytes=Gigatavua -b=b. -Kb=Kb -Mb=Mb -Gb=Gb -AmountLT1ES=Määrä RE -AmountLT2ES=Määrä IRPF -TotalLT1ES=Yhteensä RE -TotalLT2ES=Yhteensä IRPF -Available=Saatavissa -Examples=Esimerkkejä -Reason=Syy -SendByMail=Lähetä sähköpostilla -DocumentsNb=Linkitettyä kuvaa (%s) -PrintContentArea=Näytä sivu tulostaa päävalikkoon alue -NoMenu=Ei alivalikko -WarningYouAreInMaintenanceMode=Varoitus, olet ylläpitotilassa, joten vain kirjautunut %s saa käyttää hakemuksen tällä hetkellä. -CreditCard=Luottokortti -FieldsWithAreMandatory=Tähdellä %s ovat pakollisia -FieldsWithIsForPublic=Tähdellä %s näkyvät julkisen jäsenluettelo. Jos et halua tätä, tarkista "julkinen"-kenttään. -AccordingToGeoIPDatabase=(Mukaan GeoIP muuntaminen) -Line=Rivi -NotSupported=Ei tuettu -RequiredField=Pakollinen kenttä -Result=Tulos -ToTest=Testi -ValidateBefore=Kortti on validoitava ennen tämän toiminnon -Visibility=Näkyvyys -Private=Yksityinen -Hidden=Kätketty -Resources=Resurssit -Source=Lähde -Prefix=Etuliite -// STOP - Lines generated via autotranslator.php tool (2010-07-17 11:28:32). - - -// START - Lines generated via autotranslator.php tool (2012-02-29 16:10:23). -// Reference language: en_US -> fi_FI -FormatDateShortJQuery=dd/mm/yy -AddLink=Lisää linkki -Of=ja -SearchOf=Etsi -AmountByMonth=Määrä kuukausittain -DatePayment=Maksupäivä -TeraBytes=Teratavua -Tb=Tb -LT1ES=RE -LT2ES=IRPF -OtherStatistics=Muut tilastot -ActionNotApplicable=Ei sovelleta -ActionsOnMember=Tapahtumia tästä jäseneksi -JanuaryMin=Tammikuu -FebruaryMin=Helmikuu -MarchMin=Mar -AprilMin=Huhtikuu -MayMin=Toukokuu -JuneMin=Kesäkuu -JulyMin=Heinäkuu -AugustMin=Elokuu -SeptemberMin=Syyskuu -OctoberMin=Lokakuu -NovemberMin=Marraskuu -DecemberMin=Joulukuu -CoreErrorTitle=System error -CoreErrorMessage=Anteeksi, virhe. Tarkista lokit tai ota yhteyttä järjestelmänvalvojaan. -Before=Ennen -After=Jälkeen -IPAddress=IP-osoite -Frequency=Taajuus -IM=Pikaviestit -NewAttribute=Uusi ominaisuus -AttributeCode=Ominaisuuden code -OptionalFieldsSetup=Extra ominaisuuksia setup -URLPhoto=Url on kuva / logo -SetLinkToThirdParty=Linkki toiselle kolmannelle osapuolelle -CreateDraft=Luo luonnos -ClickToEdit=Klikkaa Muokkaa -ObjectDeleted=Object %s poistettu -ByCountry=Maittain -ByTown=By kaupunki -ByDate=Päivämäärän mukaan -ByMonthYear=Kun kuukausi / vuosi -ByYear=By vuosi -ByMonth=kuukausittain -ByDay=Päivällä -BySalesRepresentative=By myyntiedustaja -MondayMin=Mo -TuesdayMin=Tu -WednesdayMin=Me -ThursdayMin=Th -FridayMin=Fr -SaturdayMin=Sa -SundayMin=Su -// STOP - Lines generated via autotranslator.php tool (2012-02-29 16:12:45). + + +// START - Lines generated via autotranslator.php tool (2010-07-17 11:26:22). +// Reference language: en_US +FormatHourShortDuration=%H:%M +NoError=Ei virheitä +ErrorNoSocialContributionForSellerCountry=Virhe, ei sosiaaliturvamaksujen tyyppi määritellään maan %s ". +BackgroundColorByDefault=Default taustaväri +FileWasNotUploaded=Tiedosto on valittu liite mutta ei ollut vielä ladattu. Klikkaa "Liitä tiedosto" tätä. +NbOfEntries=Huom Merkintöjen +Resize=Asua +Recenter=Keskitä +NumberByMonth=Numero kuukausittain +KiloBytes=Kilotavua +MegaBytes=Megatavua +GigaBytes=Gigatavua +b=b. +Kb=Kb +Mb=Mb +Gb=Gb +AmountLT1ES=Määrä RE +AmountLT2ES=Määrä IRPF +TotalLT1ES=Yhteensä RE +TotalLT2ES=Yhteensä IRPF +Available=Saatavissa +Examples=Esimerkkejä +Reason=Syy +SendByMail=Lähetä sähköpostilla +DocumentsNb=Linkitettyä kuvaa (%s) +PrintContentArea=Näytä sivu tulostaa päävalikkoon alue +NoMenu=Ei alivalikko +WarningYouAreInMaintenanceMode=Varoitus, olet ylläpitotilassa, joten vain kirjautunut %s saa käyttää hakemuksen tällä hetkellä. +CreditCard=Luottokortti +FieldsWithAreMandatory=Tähdellä %s ovat pakollisia +FieldsWithIsForPublic=Tähdellä %s näkyvät julkisen jäsenluettelo. Jos et halua tätä, tarkista "julkinen"-kenttään. +AccordingToGeoIPDatabase=(Mukaan GeoIP muuntaminen) +Line=Rivi +NotSupported=Ei tuettu +RequiredField=Pakollinen kenttä +Result=Tulos +ToTest=Testi +ValidateBefore=Kortti on validoitava ennen tämän toiminnon +Visibility=Näkyvyys +Private=Yksityinen +Hidden=Kätketty +Resources=Resurssit +Source=Lähde +Prefix=Etuliite +// STOP - Lines generated via autotranslator.php tool (2010-07-17 11:28:32). + + +// START - Lines generated via autotranslator.php tool (2012-02-29 16:10:23). +// Reference language: en_US -> fi_FI +FormatDateShortJQuery=dd/mm/yy +AddLink=Lisää linkki +Of=ja +SearchOf=Etsi +AmountByMonth=Määrä kuukausittain +DatePayment=Maksupäivä +TeraBytes=Teratavua +Tb=Tb +LT1ES=RE +LT2ES=IRPF +OtherStatistics=Muut tilastot +ActionNotApplicable=Ei sovelleta +ActionsOnMember=Tapahtumia tästä jäseneksi +JanuaryMin=Tammikuu +FebruaryMin=Helmikuu +MarchMin=Mar +AprilMin=Huhtikuu +MayMin=Toukokuu +JuneMin=Kesäkuu +JulyMin=Heinäkuu +AugustMin=Elokuu +SeptemberMin=Syyskuu +OctoberMin=Lokakuu +NovemberMin=Marraskuu +DecemberMin=Joulukuu +CoreErrorTitle=System error +CoreErrorMessage=Anteeksi, virhe. Tarkista lokit tai ota yhteyttä järjestelmänvalvojaan. +Before=Ennen +After=Jälkeen +IPAddress=IP-osoite +Frequency=Taajuus +IM=Pikaviestit +NewAttribute=Uusi ominaisuus +AttributeCode=Ominaisuuden code +OptionalFieldsSetup=Extra ominaisuuksia setup +URLPhoto=Url on kuva / logo +SetLinkToThirdParty=Linkki toiselle kolmannelle osapuolelle +CreateDraft=Luo luonnos +ClickToEdit=Klikkaa Muokkaa +ObjectDeleted=Object %s poistettu +ByCountry=Maittain +ByTown=By kaupunki +ByDate=Päivämäärän mukaan +ByMonthYear=Kun kuukausi / vuosi +ByYear=By vuosi +ByMonth=kuukausittain +ByDay=Päivällä +BySalesRepresentative=By myyntiedustaja +MondayMin=Mo +TuesdayMin=Tu +WednesdayMin=Me +ThursdayMin=Th +FridayMin=Fr +SaturdayMin=Sa +SundayMin=Su +// STOP - Lines generated via autotranslator.php tool (2012-02-29 16:12:45). diff --git a/htdocs/langs/pl_PL/main.lang b/htdocs/langs/pl_PL/main.lang index f7085033613..5f725587178 100644 --- a/htdocs/langs/pl_PL/main.lang +++ b/htdocs/langs/pl_PL/main.lang @@ -567,112 +567,112 @@ Day5=Piątek Day6=Sobota Day0=Niedziela // STOP - Lines generated via autotranslator.php tool (2009-08-13 21:07:31). - - -// START - Lines generated via autotranslator.php tool (2010-09-04 01:33:40). -// Reference language: en_US -> pl_PL -FormatHourShortDuration=%H:%M -NoError=Brak błędów -ErrorNoSocialContributionForSellerCountry=Błąd, nie typ społeczny wkład określone dla kraju "%s". -BackgroundColorByDefault=domyślny kolor tła -FileWasNotUploaded=Wybraniu pliku do zamocowania, ale jeszcze nie wysłał. Kliknij na "Dołącz plik" w tej sprawie. -NbOfEntries=Uwaga wpisów -Resize=Zmiana rozmiaru -Recenter=Recenter -NumberByMonth=Ilość na miesiąc -KiloBytes=Kilobajtów -MegaBytes=MB -GigaBytes=GB -b=b. -Kb=Kb -Mb=Mb -Gb=Gb -AmountLT1ES=Kwoty RE -AmountLT2ES=Kwota IRPF -TotalLT1ES=Razem RE -TotalLT2ES=Razem IRPF -Available=Dostępny -Examples=Przykłady -Reason=Powód -SendByMail=Wyślij przez email -DocumentsNb=Dołączonych plików (%s) -PrintContentArea=Pokaż stronę do wydruku głównej treści -NoMenu=Nie podmenu -WarningYouAreInMaintenanceMode=Uwaga, jesteś w trybie konserwacji, więc tylko logowanie %s może używać aplikacji w danym momencie. -CreditCard=kart kredytowych -FieldsWithAreMandatory=%s pola są obowiązkowe -FieldsWithIsForPublic=Pola %s są wyświetlane na publiczną listę członków. Jeśli nie chcesz, zaznacz opcję "publicznych" polu. -AccordingToGeoIPDatabase=(Zgodnie z konwersji GeoIP) -Line=Linia -NotSupported=Nie są obsługiwane -RequiredField=Pole wymagane -Result=Wynik -ToTest=Test -ValidateBefore=Karty muszą być zatwierdzone przed użyciem tej funkcji -Visibility=Widoczność -Private=Prywatny -Hidden=Ukryty -Resources=Zasoby -Source=Źródło -Prefix=Przedrostek -// STOP - Lines generated via autotranslator.php tool (2010-09-04 01:55:02). - - -// START - Lines generated via autotranslator.php tool (2012-02-29 17:18:29). -// Reference language: en_US -> pl_PL -FormatDateShortJQuery=dd/mm/yy -AddLink=Dodaj link -Of=z -SearchOf=Szukaj -AmountByMonth=Kwota, o miesiąc -DatePayment=Data płatności -TeraBytes=Terabajtów -Tb=Tb -LT1ES=RE -LT2ES=IRPF -OtherStatistics=Inne statystyki -ActionNotApplicable=Nie dotyczy -ActionsOnMember=Wydarzenia O tego użytkownika -JanuaryMin=Jan -FebruaryMin=Luty -MarchMin=Mar -AprilMin=Kwietnia -MayMin=Maj -JuneMin=Czerwca -JulyMin=Lipca -AugustMin=Sierpnia -SeptemberMin=Września -OctoberMin=Października -NovemberMin=Listopada -DecemberMin=Grudzień -CoreErrorTitle=Błąd systemu -CoreErrorMessage=Przepraszamy, wystąpił błąd. Sprawdź dzienniki lub skontaktuj się z administratorem systemu. -Before=Przed -After=Po -IPAddress=Adres IP -Frequency=Częstotliwość -IM=Komunikatory -NewAttribute=Nowy atrybut -AttributeCode=Kod atrybut -OptionalFieldsSetup=Dodatkowa konfiguracja atrybutów -URLPhoto=Url zdjęciem / logo -SetLinkToThirdParty=Link do innych stron trzecich -CreateDraft=Utwórz projekt -ClickToEdit=Kliknij, aby edytować -ObjectDeleted=%s obiekt usunięty -ByCountry=Według kraju -ByTown=Przez miasto -ByDate=Według daty -ByMonthYear=Przez miesiąc / rok -ByYear=Przez rok -ByMonth=przez miesiąc -ByDay=Na dzień -BySalesRepresentative=Przez przedstawiciela handlowego -MondayMin=Mo -TuesdayMin=Tu -WednesdayMin=My -ThursdayMin=Th -FridayMin=O. -SaturdayMin=Sa -SundayMin=Ni -// STOP - Lines generated via autotranslator.php tool (2012-02-29 17:20:57). + + +// START - Lines generated via autotranslator.php tool (2010-09-04 01:33:40). +// Reference language: en_US -> pl_PL +FormatHourShortDuration=%H:%M +NoError=Brak błędów +ErrorNoSocialContributionForSellerCountry=Błąd, nie typ społeczny wkład określone dla kraju "%s". +BackgroundColorByDefault=domyślny kolor tła +FileWasNotUploaded=Wybraniu pliku do zamocowania, ale jeszcze nie wysłał. Kliknij na "Dołącz plik" w tej sprawie. +NbOfEntries=Uwaga wpisów +Resize=Zmiana rozmiaru +Recenter=Recenter +NumberByMonth=Ilość na miesiąc +KiloBytes=Kilobajtów +MegaBytes=MB +GigaBytes=GB +b=b. +Kb=Kb +Mb=Mb +Gb=Gb +AmountLT1ES=Kwoty RE +AmountLT2ES=Kwota IRPF +TotalLT1ES=Razem RE +TotalLT2ES=Razem IRPF +Available=Dostępny +Examples=Przykłady +Reason=Powód +SendByMail=Wyślij przez email +DocumentsNb=Dołączonych plików (%s) +PrintContentArea=Pokaż stronę do wydruku głównej treści +NoMenu=Nie podmenu +WarningYouAreInMaintenanceMode=Uwaga, jesteś w trybie konserwacji, więc tylko logowanie %s może używać aplikacji w danym momencie. +CreditCard=kart kredytowych +FieldsWithAreMandatory=%s pola są obowiązkowe +FieldsWithIsForPublic=Pola %s są wyświetlane na publiczną listę członków. Jeśli nie chcesz, zaznacz opcję "publicznych" polu. +AccordingToGeoIPDatabase=(Zgodnie z konwersji GeoIP) +Line=Linia +NotSupported=Nie są obsługiwane +RequiredField=Pole wymagane +Result=Wynik +ToTest=Test +ValidateBefore=Karty muszą być zatwierdzone przed użyciem tej funkcji +Visibility=Widoczność +Private=Prywatny +Hidden=Ukryty +Resources=Zasoby +Source=Źródło +Prefix=Przedrostek +// STOP - Lines generated via autotranslator.php tool (2010-09-04 01:55:02). + + +// START - Lines generated via autotranslator.php tool (2012-02-29 17:18:29). +// Reference language: en_US -> pl_PL +FormatDateShortJQuery=dd/mm/yy +AddLink=Dodaj link +Of=z +SearchOf=Szukaj +AmountByMonth=Kwota, o miesiąc +DatePayment=Data płatności +TeraBytes=Terabajtów +Tb=Tb +LT1ES=RE +LT2ES=IRPF +OtherStatistics=Inne statystyki +ActionNotApplicable=Nie dotyczy +ActionsOnMember=Wydarzenia O tego użytkownika +JanuaryMin=Jan +FebruaryMin=Luty +MarchMin=Mar +AprilMin=Kwietnia +MayMin=Maj +JuneMin=Czerwca +JulyMin=Lipca +AugustMin=Sierpnia +SeptemberMin=Września +OctoberMin=Października +NovemberMin=Listopada +DecemberMin=Grudzień +CoreErrorTitle=Błąd systemu +CoreErrorMessage=Przepraszamy, wystąpił błąd. Sprawdź dzienniki lub skontaktuj się z administratorem systemu. +Before=Przed +After=Po +IPAddress=Adres IP +Frequency=Częstotliwość +IM=Komunikatory +NewAttribute=Nowy atrybut +AttributeCode=Kod atrybut +OptionalFieldsSetup=Dodatkowa konfiguracja atrybutów +URLPhoto=Url zdjęciem / logo +SetLinkToThirdParty=Link do innych stron trzecich +CreateDraft=Utwórz projekt +ClickToEdit=Kliknij, aby edytować +ObjectDeleted=%s obiekt usunięty +ByCountry=Według kraju +ByTown=Przez miasto +ByDate=Według daty +ByMonthYear=Przez miesiąc / rok +ByYear=Przez rok +ByMonth=przez miesiąc +ByDay=Na dzień +BySalesRepresentative=Przez przedstawiciela handlowego +MondayMin=Mo +TuesdayMin=Tu +WednesdayMin=My +ThursdayMin=Th +FridayMin=O. +SaturdayMin=Sa +SundayMin=Ni +// STOP - Lines generated via autotranslator.php tool (2012-02-29 17:20:57). diff --git a/htdocs/langs/pt_BR/companies.lang b/htdocs/langs/pt_BR/companies.lang index aa8f3e6364d..adc2fadedf1 100644 --- a/htdocs/langs/pt_BR/companies.lang +++ b/htdocs/langs/pt_BR/companies.lang @@ -79,7 +79,7 @@ WrongSupplierCode=Código fornecedor incorreto CustomerCodeModel=Modelo de código cliente SupplierCodeModel=Modelo de código fornecedor Gencod=Código de barras -##### Professionnal ID #####=undefined +##### Professionnal ID ##### ProfId1Short=Prof. id 1 ProfId2Short=Prof. id 2 ProfId3Short=Prof. id 3 diff --git a/htdocs/langs/pt_BR/contracts.lang b/htdocs/langs/pt_BR/contracts.lang index b691e248f30..83db1c7ea63 100755 --- a/htdocs/langs/pt_BR/contracts.lang +++ b/htdocs/langs/pt_BR/contracts.lang @@ -76,7 +76,7 @@ ConfirmMoveToAnotherContract=Escolhi o contrato e confirmo o alterar de serviço ConfirmMoveToAnotherContractQuestion=Escolha qualquer outro contrato do mesmo Fornecedor, deseja mover este serviço? PaymentRenewContractId=Renovação do Serviço (Numero %s) ExpiredSince=Expirado desde -##### Types de contacts #####=undefined +##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Comercial assinante do contrato TypeContact_contrat_internal_SALESREPFOLL=Comercial seguimento do contrato TypeContact_contrat_external_BILLING=Contato cliente de faturação do contrato diff --git a/htdocs/langs/pt_PT/companies.lang b/htdocs/langs/pt_PT/companies.lang index f634a0311f3..81f1c4cfdc3 100644 --- a/htdocs/langs/pt_PT/companies.lang +++ b/htdocs/langs/pt_PT/companies.lang @@ -75,7 +75,7 @@ WrongSupplierCode=Código fornecedor incorrecto CustomerCodeModel=Modelo de código cliente SupplierCodeModel=Modelo de código fornecedor Gencod=Código de barras -##### Professionnal ID #####=undefined +##### Professionnal ID ##### ProfId1Short=Prof. id 1 ProfId2Short=Prof. id 2 ProfId3Short=Prof. id 3 diff --git a/htdocs/langs/pt_PT/contracts.lang b/htdocs/langs/pt_PT/contracts.lang index 96c63be8a6b..6d21d038cd4 100644 --- a/htdocs/langs/pt_PT/contracts.lang +++ b/htdocs/langs/pt_PT/contracts.lang @@ -76,7 +76,7 @@ ConfirmMoveToAnotherContract=Escolhi o contrato e confirmo o alterar de serviço ConfirmMoveToAnotherContractQuestion=Escolha qualquer outro contrato do mesmo Terceiro, deseja mover este serviço? PaymentRenewContractId=Renovação do Serviço (Numero %s) ExpiredSince=Expirado desde -##### Types de contacts #####=undefined +##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Comercial assinante do contrato TypeContact_contrat_internal_SALESREPFOLL=Comercial seguimento do contrato TypeContact_contrat_external_BILLING=Contacto cliente de facturação do contrato From 85064abdad3f97891806d78ee937fbecd2b26c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Tue, 11 Sep 2012 14:27:41 +0200 Subject: [PATCH 003/152] Search thirds from barcode directly from the mini search box Also added a check when generating barcode image --- ChangeLog | 2 +- htdocs/core/class/html.form.class.php | 6 +++++- htdocs/societe/societe.php | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7e647fcc99..a5b8e442b9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -43,7 +43,7 @@ For users: - New: [ task #498 ] Improvement of the block to add products/services lines. - New: ECM autodir works also for files joined to products and services. - New: Add a selection module for emailing to enter a recipient from gui. -- New: Allow to search product from barcodes directly from the permanent mini search left box +- New: Allow to search thirds and products from barcodes directly from the permanent mini search left box - New: Allow to search product from barcodes directly from invoices, proposals... through AJAX New experimental modules: - New: Add margin and commissions management module. diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 4af811aeb7c..5c28db87dbf 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3758,14 +3758,18 @@ class Form { global $conf; + //Check if barcode is filled in the card if (empty($object->barcode)) return ''; // Complete object if not complete if (empty($object->barcode_type_code) || empty($object->barcode_type_coder)) { - $object->fetch_barcode(); + $result = $object->fetch_barcode(); } + //Check if fetch_barcode() failed + if ($result < 1) return ''; + // Barcode image $url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($object->barcode_type_coder).'&code='.urlencode($object->barcode).'&encoding='.urlencode($object->barcode_type_code); $out =''; diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index 06c5ad9793d..4913d6c7521 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -2,6 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 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 @@ -81,6 +82,12 @@ if ($mode == 'search') $sql.= " OR s.code_client LIKE '%".$db->escape($socname)."%'"; $sql.= " OR s.email LIKE '%".$db->escape($socname)."%'"; $sql.= " OR s.url LIKE '%".$db->escape($socname)."%'"; + + if (!empty($conf->barcode->enabled)) + { + $sql.= "OR s.barcode LIKE '".$db->escape($socname)."'"; + } + $sql.= ")"; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql.= " AND s.rowid = ".$socid; From c10e58787054921de03e94f65e7b340e5f3c1d22 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 11 Sep 2012 15:42:41 +0200 Subject: [PATCH 004/152] Fix: Bad init of specimen --- htdocs/fourn/class/fournisseur.facture.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 85120705ade..6dbab9c0ecd 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1355,6 +1355,7 @@ class FactureFournisseur extends CommonInvoice $line->desc=$langs->trans("Description")." ".$xnbp; $line->qty=1; $line->subprice=100; + $line->pu_ht=100; // the canelle template use pu_ht and not subprice $line->price=100; $line->tva_tx=19.6; $line->localtax1_tx=0; @@ -1371,7 +1372,7 @@ class FactureFournisseur extends CommonInvoice $line->total_ht=100; $line->total_ttc=119.6; $line->total_tva=19.6; - $line->remise_percent=00; + $line->remise_percent=0; } $prodid = rand(1, $num_prods); From a249061017f17fdeefde2a997698de242ecb1aa2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 11 Sep 2012 15:49:46 +0200 Subject: [PATCH 005/152] Fix: If object already loaded, the url was not returned. --- htdocs/core/class/html.form.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 5c28db87dbf..c6ec1d5d151 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3765,11 +3765,10 @@ class Form if (empty($object->barcode_type_code) || empty($object->barcode_type_coder)) { $result = $object->fetch_barcode(); + //Check if fetch_barcode() failed + if ($result < 1) return ''; } - //Check if fetch_barcode() failed - if ($result < 1) return ''; - // Barcode image $url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($object->barcode_type_coder).'&code='.urlencode($object->barcode).'&encoding='.urlencode($object->barcode_type_code); $out =''; From c6c2fd2f3979fa452e3bae3e742591391aa11e41 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 11 Sep 2012 16:07:52 +0200 Subject: [PATCH 006/152] Fix: restore previous field type --- htdocs/install/mysql/migration/3.2.0-3.3.0.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql index a79bfe48ea2..a5e76b08b41 100755 --- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -190,19 +190,34 @@ UPDATE llx_boxes as b SET b.entity = (SELECT bd.entity FROM llx_boxes_def as bd -- TASK #204 alter table llx_c_tva add column localtax1_type varchar(1) default '0' after localtax1; alter table llx_c_tva add column localtax2_type varchar(1) default '0' after localtax2; +ALTER TABLE llx_c_tva MODIFY COLUMN localtax1_type varchar(1); +ALTER TABLE llx_c_tva MODIFY COLUMN localtax2_type varchar(1); alter table llx_commande_fournisseurdet add column localtax1_type varchar(1) after localtax1_tx; alter table llx_commande_fournisseurdet add column localtax2_type varchar(1) after localtax2_tx; +ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax1_type varchar(1); +ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax2_type varchar(1); alter table llx_commandedet add column localtax1_type varchar(1) after localtax1_tx; alter table llx_commandedet add column localtax2_type varchar(1) after localtax2_tx; +ALTER TABLE llx_commandedet MODIFY COLUMN localtax1_type varchar(1); +ALTER TABLE llx_commandedet MODIFY COLUMN localtax2_type varchar(1); alter table llx_facture_fourn_det add column localtax1_type varchar(1) after localtax1_tx; alter table llx_facture_fourn_det add column localtax2_type varchar(1) after localtax2_tx; +ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax1_type varchar(1); +ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax2_type varchar(1); alter table llx_facturedet add column localtax1_type varchar(1) after localtax1_tx; alter table llx_facturedet add column localtax2_type varchar(1) after localtax2_tx; +ALTER TABLE llx_facturedet MODIFY COLUMN localtax1_type varchar(1); +ALTER TABLE llx_facturedet MODIFY COLUMN localtax2_type varchar(1); alter table llx_propaldet add column localtax1_type varchar(1) after localtax1_tx; alter table llx_propaldet add column localtax2_type varchar(1) after localtax2_tx; +ALTER TABLE llx_propaldet MODIFY COLUMN localtax1_type varchar(1); +ALTER TABLE llx_propaldet MODIFY COLUMN localtax2_type varchar(1); -- END TASK #204 + +ALTER TABLE llx_menu MODIFY COLUMN enabled varchar(255) NULL default '1'; +ALTER TABLE llx_document MODIFY COLUMN permissions varchar(9) DEFAULT 'rw-rw-rw'; From f95d611f12c412c24eb49958573548b9d0bb3e56 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 11 Sep 2012 17:01:54 +0200 Subject: [PATCH 007/152] New: add hooks in dol_delete_file and list_of_documents methods --- htdocs/core/class/html.formfile.class.php | 174 +++++++++++++--------- htdocs/core/lib/files.lib.php | 121 +++++++++------ 2 files changed, 179 insertions(+), 116 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 74f190074b6..c1e3338bb2a 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -551,83 +551,115 @@ class FormFile * @param string $url Full url to use for click links ('' = autodetect) * @return int <0 if KO, nb of files shown if OK */ - function list_of_documents($filearray,$object,$modulepart,$param,$forcedownload=0,$relativepath='',$permtodelete=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='') - { - global $user, $conf, $langs; - global $bc; - global $sortfield, $sortorder, $maxheightmini; + function list_of_documents($filearray,$object,$modulepart,$param,$forcedownload=0,$relativepath='',$permtodelete=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='') + { + global $user, $conf, $langs; + global $bc, $hookmanager; + global $sortfield, $sortorder, $maxheightmini; - // Show list of existing files - if (empty($useinecm)) print_titre($title?$title:$langs->trans("AttachedFiles")); - if (empty($url)) $url=$_SERVER["PHP_SELF"]; - print ''; - print ''; - print_liste_field_titre($langs->trans("Documents2"),$url,"name","",$param,'align="left"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Size"),$url,"size","",$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Date"),$url,"date","",$param,'align="center"',$sortfield,$sortorder); - if (empty($useinecm)) print_liste_field_titre('',$url,"","",$param,'align="center"'); - print_liste_field_titre('','',''); - print ''; + if (! is_object($hookmanager)) + { + if (! class_exists('HookManager')) { + // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array + require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($db); + } + } + $hookmanager->initHooks(array('formfile')); - $nboffiles=count($filearray); + $parameters=array( + 'filearray' => $filearray, + 'modulepart'=> $modulepart, + 'param' => $param, + 'forcedownload' => $forcedownload, + 'relativepath' => $relativepath, + 'permtodelete' => $permtodelete, + 'useinecm' => $useinecm, + 'textifempty' => $textifempty, + 'maxlength' => $maxlength, + 'title' => $title, + 'url' => $url + ); + $reshook=$hookmanager->executeHooks('showNodesList', $parameters, $object); - if ($nboffiles > 0) include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; + if (isset($reshook) && $reshook != '') // 0:not deleted, 1:deleted, null or '' for bypass + { + return $reshook; + } + else + { + // Show list of existing files + if (empty($useinecm)) print_titre($title?$title:$langs->trans("AttachedFiles")); + if (empty($url)) $url=$_SERVER["PHP_SELF"]; + print '
'; + print ''; + print_liste_field_titre($langs->trans("Documents2"),$url,"name","",$param,'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Size"),$url,"size","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Date"),$url,"date","",$param,'align="center"',$sortfield,$sortorder); + if (empty($useinecm)) print_liste_field_titre('',$url,"","",$param,'align="center"'); + print_liste_field_titre('','',''); + print ''; - $var=true; - foreach($filearray as $key => $file) // filearray must be only files here - { - if ($file['name'] != '.' - && $file['name'] != '..' - && ! preg_match('/\.meta$/i',$file['name'])) - { - // Define relative path used to store the file - if (empty($relativepath)) - $relativepath=(! empty($object->ref)?dol_sanitizeFileName($object->ref):'').'/'; + $nboffiles=count($filearray); - $var=!$var; - print ''; - print '\n"; - print ''; - print ''; - // Preview - if (empty($useinecm)) - { - print ''; - } - // Delete or view link - print '"; - print "\n"; - } - } - if ($nboffiles == 0) - { - print ''; - } - print "
'; - //print "XX".$file['name']; //$file['name'] must be utf8 - print ''; - print img_mime($file['name'],$file['name'].' ('.dol_print_size($file['size'],0,0).')').' '; - print dol_trunc($file['name'],$maxlength,'middle'); - print ''; - print "'.dol_print_size($file['size'],1,1).''.dol_print_date($file['date'],"dayhour").''; - $tmp=explode('.',$file['name']); - $minifile=$tmp[0].'_mini.'.$tmp[1]; - if (image_format_supported($file['name']) > 0) print ''; - else print ' '; - print ''; - if ($useinecm) print ''.img_view().'   '; - if ($permtodelete) print ''.img_delete().''; - else print ' '; - print "
'; - if (empty($textifempty)) print $langs->trans("NoFileFound"); - else print $textifempty; - print '
"; + if ($nboffiles > 0) include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; - return $nboffiles; - } + $var=true; + foreach($filearray as $key => $file) // filearray must be only files here + { + if ($file['name'] != '.' + && $file['name'] != '..' + && ! preg_match('/\.meta$/i',$file['name'])) + { + // Define relative path used to store the file + if (empty($relativepath)) + $relativepath=(! empty($object->ref)?dol_sanitizeFileName($object->ref):'').'/'; + + $var=!$var; + print ''; + print ''; + //print "XX".$file['name']; //$file['name'] must be utf8 + print ''; + print img_mime($file['name'],$file['name'].' ('.dol_print_size($file['size'],0,0).')').' '; + print dol_trunc($file['name'],$maxlength,'middle'); + print ''; + print "\n"; + print ''.dol_print_size($file['size'],1,1).''; + print ''.dol_print_date($file['date'],"dayhour").''; + // Preview + if (empty($useinecm)) + { + print ''; + $tmp=explode('.',$file['name']); + $minifile=$tmp[0].'_mini.'.$tmp[1]; + if (image_format_supported($file['name']) > 0) print ''; + else print ' '; + print ''; + } + // Delete or view link + print ''; + if ($useinecm) print ''.img_view().'   '; + if ($permtodelete) print ''.img_delete().''; + else print ' '; + print ""; + print "\n"; + } + } + if ($nboffiles == 0) + { + print ''; + if (empty($textifempty)) print $langs->trans("NoFileFound"); + else print $textifempty; + print ''; + } + print ""; + + return $nboffiles; + } + } /** diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index af964d92ff1..787a0a0815a 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -52,6 +52,7 @@ function dol_basename($pathfile) function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter="", $sortcriteria="name", $sortorder=SORT_ASC, $mode=0) { global $db, $hookmanager; + global $object; dol_syslog("files.lib.php::dol_dir_list path=".$path." types=".$types." recursive=".$recursive." filter=".$filter." excludefilter=".json_encode($excludefilter)); @@ -83,7 +84,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil 'loaddate' => $loaddate, 'loadsize' => $loadsize ); - $reshook=$hookmanager->executeHooks('getNodesList', $parameters); + $reshook=$hookmanager->executeHooks('getNodesList', $parameters, $object); // $reshook may contain returns stacked by other modules // $reshook is always empty with an array for can not lose returns stacked with other modules @@ -764,61 +765,91 @@ function dolMoveUploadedFile($src_file, $dest_file, $allowoverwrite, $notrigger= * @param int $disableglob Disable usage of glob like * * @param int $nophperrors Disable all PHP output errors * @param int $notrigger Disable all triggers - * @param Object $object Object + * @param object $object Current object in use * @return boolean True if file is deleted, False if error */ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$notrigger=0,$object=null) { global $db, $conf, $user, $langs; + global $hookmanager; $langs->load("other"); $langs->load("errors"); - $error=0; + if (! is_object($hookmanager)) + { + if (! class_exists('HookManager')) { + // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array + require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($db); + } + } + $hookmanager->initHooks(array('fileslib')); - //print "x".$file." ".$disableglob; - $ok=true; - $file_osencoded=dol_osencode($file); // New filename encoded in OS filesystem encoding charset - if (empty($disableglob) && ! empty($file_osencoded)) - { - foreach (glob($file_osencoded) as $filename) - { - if ($nophperrors) $ok=@unlink($filename); // The unlink encapsulated by dolibarr - else $ok=unlink($filename); // The unlink encapsulated by dolibarr - if ($ok) - { - dol_syslog("Removed file ".$filename, LOG_DEBUG); - if (! $notrigger) - { - if (! is_object($object)) $object=(object) 'dummy'; - $object->src_file=$file; + $parameters=array( + 'file' => $file, + 'disableglob'=> $disableglob, + 'nophperrors' => $nophperrors, + 'notrigger' => $notrigger + ); + $reshook=$hookmanager->executeHooks('deleteFile', $parameters, $object); - // TODO Replace trigger by a hook. Triggers must be used for business events only. - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($db); - $result=$interface->run_triggers('FILE_DELETE',$object,$user,$langs,$conf); - if ($result < 0) { $error++; $errors=$interface->errors; } - // Fin appel triggers - } - } - else { - dol_syslog("Failed to remove file ".$filename, LOG_WARNING); - } - } - } - else - { - if ($nophperrors) $ok=@unlink($file_osencoded); // The unlink encapsulated by dolibarr - else $ok=unlink($file_osencoded); // The unlink encapsulated by dolibarr - if ($ok) { - dol_syslog("Removed file ".$file_osencoded, LOG_DEBUG); - } - else { - dol_syslog("Failed to remove file ".$file_osencoded, LOG_WARNING); - } - } - return $ok; + if (isset($reshook) && $reshook != '') // 0:not deleted, 1:deleted, null or '' for bypass + { + return $reshook; + } + else + { + $error=0; + + //print "x".$file." ".$disableglob; + $ok=true; + $file_osencoded=dol_osencode($file); // New filename encoded in OS filesystem encoding charset + if (empty($disableglob) && ! empty($file_osencoded)) + { + foreach (glob($file_osencoded) as $filename) + { + if ($nophperrors) $ok=@unlink($filename); // The unlink encapsulated by dolibarr + else $ok=unlink($filename); // The unlink encapsulated by dolibarr + if ($ok) + { + dol_syslog("Removed file ".$filename, LOG_DEBUG); + if (! $notrigger) + { + if (! is_object($object)) $object=(object) 'dummy'; + $object->src_file=$file; + + // TODO Replace trigger by a hook. Triggers must be used for business events only. + // REGIS just after of hook testing + // Appel des triggers + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + $interface=new Interfaces($db); + $result=$interface->run_triggers('FILE_DELETE',$object,$user,$langs,$conf); + if ($result < 0) { + $error++; $errors=$interface->errors; + } + // Fin appel triggers + } + } + else { + dol_syslog("Failed to remove file ".$filename, LOG_WARNING); + } + } + } + else + { + if ($nophperrors) $ok=@unlink($file_osencoded); // The unlink encapsulated by dolibarr + else $ok=unlink($file_osencoded); // The unlink encapsulated by dolibarr + if ($ok) { + dol_syslog("Removed file ".$file_osencoded, LOG_DEBUG); + } + else { + dol_syslog("Failed to remove file ".$file_osencoded, LOG_WARNING); + } + } + + return $ok; + } } /** From 1d6645c5c4b3da08c4a318a26a68cdf706b5c17f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 11 Sep 2012 17:05:12 +0200 Subject: [PATCH 008/152] Fix: rename this method --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c1e3338bb2a..77a5ed7ba5a 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -580,7 +580,7 @@ class FormFile 'title' => $title, 'url' => $url ); - $reshook=$hookmanager->executeHooks('showNodesList', $parameters, $object); + $reshook=$hookmanager->executeHooks('showFilesList', $parameters, $object); if (isset($reshook) && $reshook != '') // 0:not deleted, 1:deleted, null or '' for bypass { From 3e033ef48c7853d247cddaa05b51741b6562e0b2 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 11 Sep 2012 17:09:43 +0200 Subject: [PATCH 009/152] Fix: doc --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 77a5ed7ba5a..e08dc1cd9c8 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -582,7 +582,7 @@ class FormFile ); $reshook=$hookmanager->executeHooks('showFilesList', $parameters, $object); - if (isset($reshook) && $reshook != '') // 0:not deleted, 1:deleted, null or '' for bypass + if (isset($reshook) && $reshook != '') // null or '' for bypass { return $reshook; } From b39c9c514a3cd4c76830dbaf1c7af6320b6521e9 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 11 Sep 2012 18:52:23 +0200 Subject: [PATCH 010/152] Fix: split into 2 functions --- htdocs/core/lib/files.lib.php | 125 +++++++++++++++++++--------------- 1 file changed, 71 insertions(+), 54 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 787a0a0815a..89846ffc248 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -770,11 +770,7 @@ function dolMoveUploadedFile($src_file, $dest_file, $allowoverwrite, $notrigger= */ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$notrigger=0,$object=null) { - global $db, $conf, $user, $langs; - global $hookmanager; - - $langs->load("other"); - $langs->load("errors"); + global $db, $hookmanager; if (! is_object($hookmanager)) { @@ -800,58 +796,79 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$notrigger=0,$objec } else { - $error=0; - - //print "x".$file." ".$disableglob; - $ok=true; - $file_osencoded=dol_osencode($file); // New filename encoded in OS filesystem encoding charset - if (empty($disableglob) && ! empty($file_osencoded)) - { - foreach (glob($file_osencoded) as $filename) - { - if ($nophperrors) $ok=@unlink($filename); // The unlink encapsulated by dolibarr - else $ok=unlink($filename); // The unlink encapsulated by dolibarr - if ($ok) - { - dol_syslog("Removed file ".$filename, LOG_DEBUG); - if (! $notrigger) - { - if (! is_object($object)) $object=(object) 'dummy'; - $object->src_file=$file; - - // TODO Replace trigger by a hook. Triggers must be used for business events only. - // REGIS just after of hook testing - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($db); - $result=$interface->run_triggers('FILE_DELETE',$object,$user,$langs,$conf); - if ($result < 0) { - $error++; $errors=$interface->errors; - } - // Fin appel triggers - } - } - else { - dol_syslog("Failed to remove file ".$filename, LOG_WARNING); - } - } - } - else - { - if ($nophperrors) $ok=@unlink($file_osencoded); // The unlink encapsulated by dolibarr - else $ok=unlink($file_osencoded); // The unlink encapsulated by dolibarr - if ($ok) { - dol_syslog("Removed file ".$file_osencoded, LOG_DEBUG); - } - else { - dol_syslog("Failed to remove file ".$file_osencoded, LOG_WARNING); - } - } - - return $ok; + return dolDeleteFile($file, $disableglob, $nophperrors, $notrigger, $object); } } +/** + * Remove a file or several files with a mask + * + * @param string $file File to delete or mask of file to delete + * @param int $disableglob Disable usage of glob like * + * @param int $nophperrors Disable all PHP output errors + * @param int $notrigger Disable all triggers + * @param object $object Current object in use + * @return boolean True if file is deleted, False if error + * @see dol_delete_file + */ +function dolDeleteFile($file,$disableglob=0,$nophperrors=0,$notrigger=0,$object=null) +{ + global $db, $conf, $user, $langs; + + $langs->load("other"); + $langs->load("errors"); + + $error=0; + + //print "x".$file." ".$disableglob; + $ok=true; + $file_osencoded=dol_osencode($file); // New filename encoded in OS filesystem encoding charset + if (empty($disableglob) && ! empty($file_osencoded)) + { + foreach (glob($file_osencoded) as $filename) + { + if ($nophperrors) $ok=@unlink($filename); // The unlink encapsulated by dolibarr + else $ok=unlink($filename); // The unlink encapsulated by dolibarr + if ($ok) + { + dol_syslog("Removed file ".$filename, LOG_DEBUG); + if (! $notrigger) + { + if (! is_object($object)) $object=(object) 'dummy'; + $object->src_file=$file; + + // TODO Replace trigger by a hook. Triggers must be used for business events only. + // REGIS just after of hook testing + // Appel des triggers + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + $interface=new Interfaces($db); + $result=$interface->run_triggers('FILE_DELETE',$object,$user,$langs,$conf); + if ($result < 0) { + $error++; $errors=$interface->errors; + } + // Fin appel triggers + } + } + else { + dol_syslog("Failed to remove file ".$filename, LOG_WARNING); + } + } + } + else + { + if ($nophperrors) $ok=@unlink($file_osencoded); // The unlink encapsulated by dolibarr + else $ok=unlink($file_osencoded); // The unlink encapsulated by dolibarr + if ($ok) { + dol_syslog("Removed file ".$file_osencoded, LOG_DEBUG); + } + else { + dol_syslog("Failed to remove file ".$file_osencoded, LOG_WARNING); + } + } + + return $ok; +} + /** * Remove a directory (not recursive, so content must be empty). * If directory is not empty, return false From 54be534506682f3353f8720a4c2ca31e3022b2ee Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 11 Sep 2012 20:06:37 +0200 Subject: [PATCH 011/152] Add comment and renamed file to be sure new function is not called directly. Not sure it's a good idea to have dolDeleteFile separated since it must be called only by dol_delete_file. --- htdocs/core/lib/files.lib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 89846ffc248..7a6d6853867 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -796,12 +796,13 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$notrigger=0,$objec } else { - return dolDeleteFile($file, $disableglob, $nophperrors, $notrigger, $object); + return _dolDeleteFile($file, $disableglob, $nophperrors, $notrigger, $object); } } /** - * Remove a file or several files with a mask + * Remove a file or several files with a mask. + * Never call this function ! Call dol_delete_file file instead. * * @param string $file File to delete or mask of file to delete * @param int $disableglob Disable usage of glob like * @@ -811,7 +812,7 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$notrigger=0,$objec * @return boolean True if file is deleted, False if error * @see dol_delete_file */ -function dolDeleteFile($file,$disableglob=0,$nophperrors=0,$notrigger=0,$object=null) +function _dolDeleteFile($file,$disableglob=0,$nophperrors=0,$notrigger=0,$object=null) { global $db, $conf, $user, $langs; From 8fcf20227a3361db0fd5af1f0d03b14e9b8b8ad8 Mon Sep 17 00:00:00 2001 From: Stephen L Date: Tue, 11 Sep 2012 20:15:03 +0200 Subject: [PATCH 012/152] Fix: definition of all substitution functions is no more required Signed-off-by: Stephen L. --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6b3cf8fc56f..91c4ea4b088 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3457,7 +3457,7 @@ function complete_substitutions_array(&$substitutionarray,$outputlangs,$object=' dol_syslog("Library functions_".$substitfile['name']." found into ".$dir); require_once $dir.$substitfile['name']; $function_name=$module."_".$callfunc; - $function_name($substitutionarray,$outputlangs,$object,$parameters); + if (function_exists($function_name)) $function_name($substitutionarray,$outputlangs,$object,$parameters); } } } From 71d5191ff7c8b38e4bcc869a561a4e8125090710 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 12 Sep 2012 10:46:35 +0200 Subject: [PATCH 013/152] Fix: duplicate parameters --- htdocs/core/class/html.formfile.class.php | 6 ++++-- htdocs/core/lib/files.lib.php | 4 ++-- htdocs/product/document.php | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index e08dc1cd9c8..db2cdb8cfcb 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -551,7 +551,7 @@ class FormFile * @param string $url Full url to use for click links ('' = autodetect) * @return int <0 if KO, nb of files shown if OK */ - function list_of_documents($filearray,$object,$modulepart,$param,$forcedownload=0,$relativepath='',$permtodelete=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='') + function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permtodelete=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='') { global $user, $conf, $langs; global $bc, $hookmanager; @@ -588,6 +588,8 @@ class FormFile } else { + $param = (isset($object->id)?'&id='.$object->id:'').$param; + // Show list of existing files if (empty($useinecm)) print_titre($title?$title:$langs->trans("AttachedFiles")); if (empty($url)) $url=$_SERVER["PHP_SELF"]; @@ -642,7 +644,7 @@ class FormFile // Delete or view link print ''; if ($useinecm) print ''.img_view().'   '; - if ($permtodelete) print ''.img_delete().''; + if ($permtodelete) print ''.img_delete().''; else print ' '; print ""; print "\n"; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 89846ffc248..5f415707bb4 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -716,7 +716,7 @@ function dolMoveUploadedFile($src_file, $dest_file, $allowoverwrite, $notrigger= { if (file_exists($file_name_osencoded)) { - dol_syslog("Files.lib::dol_move_uploaded_file File ".$file_name." already exists. Return 'ErrorFileAlreadyExists'", LOG_WARNING); + dol_syslog("Files.lib::dol_move_uploaded_file File ".$dest_file." already exists. Return 'ErrorFileAlreadyExists'", LOG_WARNING); return 'ErrorFileAlreadyExists'; } } @@ -726,7 +726,7 @@ function dolMoveUploadedFile($src_file, $dest_file, $allowoverwrite, $notrigger= if ($return) { if (! empty($conf->global->MAIN_UMASK)) @chmod($file_name_osencoded, octdec($conf->global->MAIN_UMASK)); - dol_syslog("Files.lib::dol_move_uploaded_file Success to move ".$src_file." to ".$file_name." - Umask=".$conf->global->MAIN_UMASK, LOG_DEBUG); + dol_syslog("Files.lib::dol_move_uploaded_file Success to move ".$src_file." to ".$dest_file." - Umask=".$conf->global->MAIN_UMASK, LOG_DEBUG); if (! $notrigger) { diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 012133f4eaa..7ee96daf980 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -151,8 +151,7 @@ if ($object->id) // List of document - $param='&id='.$object->id; - $formfile->list_of_documents($filearray,$object,'produit',$param); + $formfile->list_of_documents($filearray,$object,'produit'); } else From b75efdcf10132aff0389ece68958b29b3141bfd6 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 12 Sep 2012 12:27:11 +0200 Subject: [PATCH 014/152] Fix: regression, replace triggers by hooks --- htdocs/core/lib/files.lib.php | 423 +++++++----------- .../interface_90_all_Demo.class.php-NORUN | 10 - 2 files changed, 163 insertions(+), 270 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index b8a5f4fd96a..fa9c9de437d 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -565,196 +565,136 @@ function dol_unescapefile($filename) * @param int $allowoverwrite 1=Overwrite target file if it already exists * @param int $disablevirusscan 1=Disable virus scan * @param string $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error']) - * @param int $notrigger Disable all triggers + * @param int $nohook Disable all hooks * @param string $varfiles _FILES var name * @return int >0 if OK, <0 or string if KO * @see dolCheckUploadedFile, dol_move */ -function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $notrigger=0, $varfiles='addedfile') +function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile') { - global $db, $hookmanager; - global $object; + global $conf, $db, $user, $langs; + global $object, $hookmanager; $error=0; - - // Check uploaded file - $dest_file=dolCheckUploadedFile($src_file, $dest_file, $disablevirusscan, $uploaderrorcode); - if (is_array($dest_file) && isset($dest_file['error'])) return $dest_file['error']; - - if (! is_object($hookmanager)) - { - if (! class_exists('HookManager')) { - // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array - require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager=new HookManager($db); - } - } - $hookmanager->initHooks(array('fileslib')); - - $parameters=array('dest_file' => $dest_file, 'varfiles' => $varfiles, 'allowoverwrite' => $allowoverwrite, 'notrigger' => $notrigger); - $reshook=$hookmanager->executeHooks('dolMoveUploadedFile', $parameters, $object); - - if (empty($reshook)) { - return dolMoveUploadedFile($src_file, $dest_file, $allowoverwrite, $notrigger); - } -} - -/** - * Check an uploaded file. - * If there is errors (virus found, antivir in error, bad filename), file is not moved. - * - * @param string $src_file Source full path filename ($_FILES['field']['tmp_name']) - * @param string $dest_file Target full path filename ($_FILES['field']['name']) - * @param int $disablevirusscan 1=Disable virus scan - * @param string $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error']) - * @return int >0 if OK, <0 or string if KO - * @see dol_move_uploaded_file - */ -function dolCheckUploadedFile($src_file, $dest_file, $disablevirusscan=0, $uploaderrorcode=0) -{ - global $conf; - $file_name = $dest_file; - // If an upload error has been reported - if ($uploaderrorcode) - { - switch($uploaderrorcode) - { - case UPLOAD_ERR_INI_SIZE: // 1 - return array('error' => 'ErrorFileSizeTooLarge'); - break; - case UPLOAD_ERR_FORM_SIZE: // 2 - return array('error' => 'ErrorFileSizeTooLarge'); - break; - case UPLOAD_ERR_PARTIAL: // 3 - return array('error' => 'ErrorPartialFile'); - break; - case UPLOAD_ERR_NO_TMP_DIR: // - return array('error' => 'ErrorNoTmpDir'); - break; - case UPLOAD_ERR_CANT_WRITE: - return array('error' => 'ErrorFailedToWriteInDir'); - break; - case UPLOAD_ERR_EXTENSION: - return array('error' => 'ErrorUploadBlockedByAddon'); - break; - default: - break; - } - } - // If we need to make a virus scan - if (empty($disablevirusscan) && file_exists($src_file) && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) - { - if (! class_exists('AntiVir')) { - require DOL_DOCUMENT_ROOT.'/core/class/antivir.class.php'; - } - $antivir=new AntiVir($db); - $result = $antivir->dol_avscan_file($src_file); - if ($result < 0) // If virus or error, we stop here - { - $reterrors=$antivir->errors; - dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$file_name.'") KO with antivirus: result='.$result.' errors='.join(',',$antivir->errors), LOG_WARNING); - return array('error' => 'ErrorFileIsInfectedWithAVirus: '.join(',',$reterrors)); - } - } - - // Security: - // Disallow file with some extensions. We renamed them. - // Car si on a mis le rep documents dans un rep de la racine web (pas bien), cela permet d'executer du code a la demande. - if (preg_match('/\.htm|\.html|\.php|\.pl|\.cgi$/i',$file_name)) - { - $file_name.= '.noexe'; - } - - // Security: - // On interdit fichiers caches, remontees de repertoire ainsi que les pipes dans les noms de fichiers. - if (preg_match('/^\./',$src_file) || preg_match('/\.\./',$src_file) || preg_match('/[<>|]/',$src_file)) - { - dol_syslog("Refused to deliver file ".$src_file, LOG_WARNING); - return array('error' => -1); - } - - // Security: - // On interdit fichiers caches, remontees de repertoire ainsi que les pipe dans - // les noms de fichiers. - if (preg_match('/^\./',$dest_file) || preg_match('/\.\./',$dest_file) || preg_match('/[<>|]/',$dest_file)) - { - dol_syslog("Refused to deliver file ".$dest_file, LOG_WARNING); - return array('error' => -2); - } - - return $file_name; -} - -/** - * Move an uploaded file after some controls. - * If there is errors (virus found, antivir in error, bad filename), file is not moved. - * - * @param string $src_file Source full path filename ($_FILES['field']['tmp_name']) - * @param string $dest_file Target full path filename ($_FILES['field']['name']) - * @param int $allowoverwrite 1=Overwrite target file if it already exists - * @param int $notrigger Disable all triggers - * @return int >0 if OK, <0 or string if KO - */ -function dolMoveUploadedFile($src_file, $dest_file, $allowoverwrite, $notrigger=0) -{ - global $conf, $user, $langs, $db; - global $object; - - $error=0; - - // The file functions must be in OS filesystem encoding. - $src_file_osencoded=dol_osencode($src_file); - $file_name_osencoded=dol_osencode($dest_file); - - // Check if destination dir is writable - // TODO - - // Check if destination file already exists - if (! $allowoverwrite) - { - if (file_exists($file_name_osencoded)) - { - dol_syslog("Files.lib::dol_move_uploaded_file File ".$dest_file." already exists. Return 'ErrorFileAlreadyExists'", LOG_WARNING); - return 'ErrorFileAlreadyExists'; - } - } - - // Move file - $return=move_uploaded_file($src_file_osencoded, $file_name_osencoded); - if ($return) - { - if (! empty($conf->global->MAIN_UMASK)) @chmod($file_name_osencoded, octdec($conf->global->MAIN_UMASK)); - dol_syslog("Files.lib::dol_move_uploaded_file Success to move ".$src_file." to ".$dest_file." - Umask=".$conf->global->MAIN_UMASK, LOG_DEBUG); - - if (! $notrigger) - { - if (is_object($object)) - { - $object->src_file=$dest_file; - - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($db); - $result=$interface->run_triggers('FILE_UPLOAD',$object,$user,$langs,$conf); - if ($result < 0) { - $error++; $errors=$interface->errors; - } - // Fin appel triggers - } - else - { - dol_syslog("Files.lib::dol_move_uploaded_file Object not find", LOG_WARNING); - } + if (empty($nohook)) + { + // If an upload error has been reported + if ($uploaderrorcode) + { + switch($uploaderrorcode) + { + case UPLOAD_ERR_INI_SIZE: // 1 + return 'ErrorFileSizeTooLarge'; + break; + case UPLOAD_ERR_FORM_SIZE: // 2 + return 'ErrorFileSizeTooLarge'; + break; + case UPLOAD_ERR_PARTIAL: // 3 + return 'ErrorPartialFile'; + break; + case UPLOAD_ERR_NO_TMP_DIR: // + return 'ErrorNoTmpDir'; + break; + case UPLOAD_ERR_CANT_WRITE: + return 'ErrorFailedToWriteInDir'; + break; + case UPLOAD_ERR_EXTENSION: + return 'ErrorUploadBlockedByAddon'; + break; + default: + break; + } + } + + // If we need to make a virus scan + if (empty($disablevirusscan) && file_exists($src_file) && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) + { + if (! class_exists('AntiVir')) { + require DOL_DOCUMENT_ROOT.'/core/class/antivir.class.php'; + } + $antivir=new AntiVir($db); + $result = $antivir->dol_avscan_file($src_file); + if ($result < 0) // If virus or error, we stop here + { + $reterrors=$antivir->errors; + dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$dest_file.'") KO with antivirus: result='.$result.' errors='.join(',',$antivir->errors), LOG_WARNING); + return 'ErrorFileIsInfectedWithAVirus: '.join(',',$reterrors); + } + } + + // Security: + // Disallow file with some extensions. We renamed them. + // Car si on a mis le rep documents dans un rep de la racine web (pas bien), cela permet d'executer du code a la demande. + if (preg_match('/\.htm|\.html|\.php|\.pl|\.cgi$/i',$dest_file)) + { + $file_name.= '.noexe'; + } + + // Security: + // On interdit fichiers caches, remontees de repertoire ainsi que les pipes dans les noms de fichiers. + if (preg_match('/^\./',$src_file) || preg_match('/\.\./',$src_file) || preg_match('/[<>|]/',$src_file)) + { + dol_syslog("Refused to deliver file ".$src_file, LOG_WARNING); + return -1; + } + + // Security: + // On interdit fichiers caches, remontees de repertoire ainsi que les pipe dans + // les noms de fichiers. + if (preg_match('/^\./',$dest_file) || preg_match('/\.\./',$dest_file) || preg_match('/[<>|]/',$dest_file)) + { + dol_syslog("Refused to deliver file ".$dest_file, LOG_WARNING); + return -2; } - return 1; // Success + if (! is_object($hookmanager)) + { + if (! class_exists('HookManager')) { + // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array + require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($db); + } + } + $hookmanager->initHooks(array('fileslib')); + + $parameters=array('filename' => $file_name, 'varfiles' => $varfiles, 'allowoverwrite' => $allowoverwrite); + $reshook=$hookmanager->executeHooks('dolMoveUploadedFile', $parameters, $object); } - else + + if (empty($reshook)) { - dol_syslog("Files.lib::dol_move_uploaded_file Failed to move ".$src_file." to ".$file_name, LOG_ERR); - return -3; // Unknown error + // The file functions must be in OS filesystem encoding. + $src_file_osencoded=dol_osencode($src_file); + $file_name_osencoded=dol_osencode($file_name); + + // Check if destination dir is writable + // TODO + + // Check if destination file already exists + if (! $allowoverwrite) + { + if (file_exists($file_name_osencoded)) + { + dol_syslog("Files.lib::dol_move_uploaded_file File ".$file_name." already exists. Return 'ErrorFileAlreadyExists'", LOG_WARNING); + return 'ErrorFileAlreadyExists'; + } + } + + // Move file + $return=move_uploaded_file($src_file_osencoded, $file_name_osencoded); + if ($return) + { + if (! empty($conf->global->MAIN_UMASK)) @chmod($file_name_osencoded, octdec($conf->global->MAIN_UMASK)); + dol_syslog("Files.lib::dol_move_uploaded_file Success to move ".$src_file." to ".$file_name." - Umask=".$conf->global->MAIN_UMASK, LOG_DEBUG); + return 1; // Success + } + else + { + dol_syslog("Files.lib::dol_move_uploaded_file Failed to move ".$src_file." to ".$file_name, LOG_ERR); + return -3; // Unknown error + } } } @@ -764,110 +704,73 @@ function dolMoveUploadedFile($src_file, $dest_file, $allowoverwrite, $notrigger= * @param string $file File to delete or mask of file to delete * @param int $disableglob Disable usage of glob like * * @param int $nophperrors Disable all PHP output errors - * @param int $notrigger Disable all triggers + * @param int $nohook Disable all hooks * @param object $object Current object in use * @return boolean True if file is deleted, False if error */ -function dol_delete_file($file,$disableglob=0,$nophperrors=0,$notrigger=0,$object=null) +function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=null) { - global $db, $hookmanager; + global $db, $conf, $user, $langs; + global $hookmanager; - if (! is_object($hookmanager)) + $langs->load("other"); + $langs->load("errors"); + + if (empty($nohook)) { - if (! class_exists('HookManager')) { - // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array - require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager=new HookManager($db); - } + if (! is_object($hookmanager)) + { + if (! class_exists('HookManager')) { + // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array + require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($db); + } + } + $hookmanager->initHooks(array('fileslib')); + + $parameters=array( + 'file' => $file, + 'disableglob'=> $disableglob, + 'nophperrors' => $nophperrors + ); + $reshook=$hookmanager->executeHooks('deleteFile', $parameters, $object); } - $hookmanager->initHooks(array('fileslib')); - $parameters=array( - 'file' => $file, - 'disableglob'=> $disableglob, - 'nophperrors' => $nophperrors, - 'notrigger' => $notrigger - ); - $reshook=$hookmanager->executeHooks('deleteFile', $parameters, $object); - - if (isset($reshook) && $reshook != '') // 0:not deleted, 1:deleted, null or '' for bypass + if (empty($nohook) && isset($reshook) && $reshook != '') // 0:not deleted, 1:deleted, null or '' for bypass { return $reshook; } else { - return _dolDeleteFile($file, $disableglob, $nophperrors, $notrigger, $object); - } -} - -/** - * Remove a file or several files with a mask. - * Never call this function ! Call dol_delete_file file instead. - * - * @param string $file File to delete or mask of file to delete - * @param int $disableglob Disable usage of glob like * - * @param int $nophperrors Disable all PHP output errors - * @param int $notrigger Disable all triggers - * @param object $object Current object in use - * @return boolean True if file is deleted, False if error - * @see dol_delete_file - */ -function _dolDeleteFile($file,$disableglob=0,$nophperrors=0,$notrigger=0,$object=null) -{ - global $db, $conf, $user, $langs; - - $langs->load("other"); - $langs->load("errors"); - - $error=0; + $error=0; - //print "x".$file." ".$disableglob; - $ok=true; - $file_osencoded=dol_osencode($file); // New filename encoded in OS filesystem encoding charset - if (empty($disableglob) && ! empty($file_osencoded)) - { - foreach (glob($file_osencoded) as $filename) + //print "x".$file." ".$disableglob; + $ok=true; + $file_osencoded=dol_osencode($file); // New filename encoded in OS filesystem encoding charset + if (empty($disableglob) && ! empty($file_osencoded)) { - if ($nophperrors) $ok=@unlink($filename); // The unlink encapsulated by dolibarr - else $ok=unlink($filename); // The unlink encapsulated by dolibarr - if ($ok) + foreach (glob($file_osencoded) as $filename) { - dol_syslog("Removed file ".$filename, LOG_DEBUG); - if (! $notrigger) - { - if (! is_object($object)) $object=(object) 'dummy'; - $object->src_file=$file; - - // TODO Replace trigger by a hook. Triggers must be used for business events only. - // REGIS just after of hook testing - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($db); - $result=$interface->run_triggers('FILE_DELETE',$object,$user,$langs,$conf); - if ($result < 0) { - $error++; $errors=$interface->errors; - } - // Fin appel triggers - } + if ($nophperrors) $ok=@unlink($filename); // The unlink encapsulated by dolibarr + else $ok=unlink($filename); // The unlink encapsulated by dolibarr + if ($ok) dol_syslog("Removed file ".$filename, LOG_DEBUG); + else dol_syslog("Failed to remove file ".$filename, LOG_WARNING); + } + } + else + { + if ($nophperrors) $ok=@unlink($file_osencoded); // The unlink encapsulated by dolibarr + else $ok=unlink($file_osencoded); // The unlink encapsulated by dolibarr + if ($ok) { + dol_syslog("Removed file ".$file_osencoded, LOG_DEBUG); } else { - dol_syslog("Failed to remove file ".$filename, LOG_WARNING); + dol_syslog("Failed to remove file ".$file_osencoded, LOG_WARNING); } } - } - else - { - if ($nophperrors) $ok=@unlink($file_osencoded); // The unlink encapsulated by dolibarr - else $ok=unlink($file_osencoded); // The unlink encapsulated by dolibarr - if ($ok) { - dol_syslog("Removed file ".$file_osencoded, LOG_DEBUG); - } - else { - dol_syslog("Failed to remove file ".$file_osencoded, LOG_WARNING); - } - } - return $ok; + return $ok; + } } /** diff --git a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN index 6a403c586de..40baabf2a33 100755 --- a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN +++ b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN @@ -529,16 +529,6 @@ class InterfaceDemo dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } elseif ($action == 'SHIPPING_BUILDDOC') - { - dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - } - - // File - elseif ($action == 'FILE_UPLOAD') - { - dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); - } - elseif ($action == 'FILE_DELETE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } From 7358223c8fbd8c9fffbf059eda6bb87faf745990 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 12 Sep 2012 12:41:44 +0200 Subject: [PATCH 015/152] Fix: convert line delimiters --- htdocs/core/lib/files.lib.php | 298 +++++++++++++++++----------------- 1 file changed, 147 insertions(+), 151 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index fa9c9de437d..fc4ebd4c25f 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -568,7 +568,7 @@ function dol_unescapefile($filename) * @param int $nohook Disable all hooks * @param string $varfiles _FILES var name * @return int >0 if OK, <0 or string if KO - * @see dolCheckUploadedFile, dol_move + * @see dol_move */ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile') { @@ -579,121 +579,121 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable $file_name = $dest_file; if (empty($nohook)) - { - // If an upload error has been reported - if ($uploaderrorcode) - { - switch($uploaderrorcode) - { - case UPLOAD_ERR_INI_SIZE: // 1 - return 'ErrorFileSizeTooLarge'; - break; - case UPLOAD_ERR_FORM_SIZE: // 2 - return 'ErrorFileSizeTooLarge'; - break; - case UPLOAD_ERR_PARTIAL: // 3 - return 'ErrorPartialFile'; - break; - case UPLOAD_ERR_NO_TMP_DIR: // - return 'ErrorNoTmpDir'; - break; - case UPLOAD_ERR_CANT_WRITE: - return 'ErrorFailedToWriteInDir'; - break; - case UPLOAD_ERR_EXTENSION: - return 'ErrorUploadBlockedByAddon'; - break; - default: - break; - } - } - - // If we need to make a virus scan - if (empty($disablevirusscan) && file_exists($src_file) && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) - { - if (! class_exists('AntiVir')) { - require DOL_DOCUMENT_ROOT.'/core/class/antivir.class.php'; - } - $antivir=new AntiVir($db); - $result = $antivir->dol_avscan_file($src_file); - if ($result < 0) // If virus or error, we stop here - { - $reterrors=$antivir->errors; - dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$dest_file.'") KO with antivirus: result='.$result.' errors='.join(',',$antivir->errors), LOG_WARNING); - return 'ErrorFileIsInfectedWithAVirus: '.join(',',$reterrors); - } - } - - // Security: - // Disallow file with some extensions. We renamed them. - // Car si on a mis le rep documents dans un rep de la racine web (pas bien), cela permet d'executer du code a la demande. - if (preg_match('/\.htm|\.html|\.php|\.pl|\.cgi$/i',$dest_file)) - { - $file_name.= '.noexe'; - } - - // Security: - // On interdit fichiers caches, remontees de repertoire ainsi que les pipes dans les noms de fichiers. - if (preg_match('/^\./',$src_file) || preg_match('/\.\./',$src_file) || preg_match('/[<>|]/',$src_file)) - { - dol_syslog("Refused to deliver file ".$src_file, LOG_WARNING); - return -1; - } - - // Security: - // On interdit fichiers caches, remontees de repertoire ainsi que les pipe dans - // les noms de fichiers. - if (preg_match('/^\./',$dest_file) || preg_match('/\.\./',$dest_file) || preg_match('/[<>|]/',$dest_file)) - { - dol_syslog("Refused to deliver file ".$dest_file, LOG_WARNING); - return -2; + { + // If an upload error has been reported + if ($uploaderrorcode) + { + switch($uploaderrorcode) + { + case UPLOAD_ERR_INI_SIZE: // 1 + return 'ErrorFileSizeTooLarge'; + break; + case UPLOAD_ERR_FORM_SIZE: // 2 + return 'ErrorFileSizeTooLarge'; + break; + case UPLOAD_ERR_PARTIAL: // 3 + return 'ErrorPartialFile'; + break; + case UPLOAD_ERR_NO_TMP_DIR: // + return 'ErrorNoTmpDir'; + break; + case UPLOAD_ERR_CANT_WRITE: + return 'ErrorFailedToWriteInDir'; + break; + case UPLOAD_ERR_EXTENSION: + return 'ErrorUploadBlockedByAddon'; + break; + default: + break; + } } - if (! is_object($hookmanager)) - { - if (! class_exists('HookManager')) { - // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array - require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager=new HookManager($db); - } - } - $hookmanager->initHooks(array('fileslib')); - - $parameters=array('filename' => $file_name, 'varfiles' => $varfiles, 'allowoverwrite' => $allowoverwrite); + // If we need to make a virus scan + if (empty($disablevirusscan) && file_exists($src_file) && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) + { + if (! class_exists('AntiVir')) { + require DOL_DOCUMENT_ROOT.'/core/class/antivir.class.php'; + } + $antivir=new AntiVir($db); + $result = $antivir->dol_avscan_file($src_file); + if ($result < 0) // If virus or error, we stop here + { + $reterrors=$antivir->errors; + dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$dest_file.'") KO with antivirus: result='.$result.' errors='.join(',',$antivir->errors), LOG_WARNING); + return 'ErrorFileIsInfectedWithAVirus: '.join(',',$reterrors); + } + } + + // Security: + // Disallow file with some extensions. We renamed them. + // Car si on a mis le rep documents dans un rep de la racine web (pas bien), cela permet d'executer du code a la demande. + if (preg_match('/\.htm|\.html|\.php|\.pl|\.cgi$/i',$dest_file)) + { + $file_name.= '.noexe'; + } + + // Security: + // On interdit fichiers caches, remontees de repertoire ainsi que les pipes dans les noms de fichiers. + if (preg_match('/^\./',$src_file) || preg_match('/\.\./',$src_file) || preg_match('/[<>|]/',$src_file)) + { + dol_syslog("Refused to deliver file ".$src_file, LOG_WARNING); + return -1; + } + + // Security: + // On interdit fichiers caches, remontees de repertoire ainsi que les pipe dans + // les noms de fichiers. + if (preg_match('/^\./',$dest_file) || preg_match('/\.\./',$dest_file) || preg_match('/[<>|]/',$dest_file)) + { + dol_syslog("Refused to deliver file ".$dest_file, LOG_WARNING); + return -2; + } + + if (! is_object($hookmanager)) + { + if (! class_exists('HookManager')) { + // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array + require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($db); + } + } + $hookmanager->initHooks(array('fileslib')); + + $parameters=array('filename' => $file_name, 'varfiles' => $varfiles, 'allowoverwrite' => $allowoverwrite); $reshook=$hookmanager->executeHooks('dolMoveUploadedFile', $parameters, $object); } if (empty($reshook)) { - // The file functions must be in OS filesystem encoding. - $src_file_osencoded=dol_osencode($src_file); - $file_name_osencoded=dol_osencode($file_name); - - // Check if destination dir is writable - // TODO - - // Check if destination file already exists - if (! $allowoverwrite) - { - if (file_exists($file_name_osencoded)) - { - dol_syslog("Files.lib::dol_move_uploaded_file File ".$file_name." already exists. Return 'ErrorFileAlreadyExists'", LOG_WARNING); - return 'ErrorFileAlreadyExists'; - } - } - - // Move file - $return=move_uploaded_file($src_file_osencoded, $file_name_osencoded); - if ($return) - { - if (! empty($conf->global->MAIN_UMASK)) @chmod($file_name_osencoded, octdec($conf->global->MAIN_UMASK)); - dol_syslog("Files.lib::dol_move_uploaded_file Success to move ".$src_file." to ".$file_name." - Umask=".$conf->global->MAIN_UMASK, LOG_DEBUG); - return 1; // Success - } - else - { - dol_syslog("Files.lib::dol_move_uploaded_file Failed to move ".$src_file." to ".$file_name, LOG_ERR); - return -3; // Unknown error + // The file functions must be in OS filesystem encoding. + $src_file_osencoded=dol_osencode($src_file); + $file_name_osencoded=dol_osencode($file_name); + + // Check if destination dir is writable + // TODO + + // Check if destination file already exists + if (! $allowoverwrite) + { + if (file_exists($file_name_osencoded)) + { + dol_syslog("Files.lib::dol_move_uploaded_file File ".$file_name." already exists. Return 'ErrorFileAlreadyExists'", LOG_WARNING); + return 'ErrorFileAlreadyExists'; + } + } + + // Move file + $return=move_uploaded_file($src_file_osencoded, $file_name_osencoded); + if ($return) + { + if (! empty($conf->global->MAIN_UMASK)) @chmod($file_name_osencoded, octdec($conf->global->MAIN_UMASK)); + dol_syslog("Files.lib::dol_move_uploaded_file Success to move ".$src_file." to ".$file_name." - Umask=".$conf->global->MAIN_UMASK, LOG_DEBUG); + return 1; // Success + } + else + { + dol_syslog("Files.lib::dol_move_uploaded_file Failed to move ".$src_file." to ".$file_name, LOG_ERR); + return -3; // Unknown error } } } @@ -713,26 +713,26 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n global $db, $conf, $user, $langs; global $hookmanager; - $langs->load("other"); + $langs->load("other"); $langs->load("errors"); if (empty($nohook)) { - if (! is_object($hookmanager)) - { - if (! class_exists('HookManager')) { - // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array - require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager=new HookManager($db); - } - } - $hookmanager->initHooks(array('fileslib')); - - $parameters=array( - 'file' => $file, - 'disableglob'=> $disableglob, - 'nophperrors' => $nophperrors - ); + if (! is_object($hookmanager)) + { + if (! class_exists('HookManager')) { + // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array + require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($db); + } + } + $hookmanager->initHooks(array('fileslib')); + + $parameters=array( + 'file' => $file, + 'disableglob'=> $disableglob, + 'nophperrors' => $nophperrors + ); $reshook=$hookmanager->executeHooks('deleteFile', $parameters, $object); } @@ -742,33 +742,29 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n } else { - $error=0; - - //print "x".$file." ".$disableglob; - $ok=true; - $file_osencoded=dol_osencode($file); // New filename encoded in OS filesystem encoding charset - if (empty($disableglob) && ! empty($file_osencoded)) - { - foreach (glob($file_osencoded) as $filename) - { - if ($nophperrors) $ok=@unlink($filename); // The unlink encapsulated by dolibarr - else $ok=unlink($filename); // The unlink encapsulated by dolibarr + $error=0; + + //print "x".$file." ".$disableglob; + $ok=true; + $file_osencoded=dol_osencode($file); // New filename encoded in OS filesystem encoding charset + if (empty($disableglob) && ! empty($file_osencoded)) + { + foreach (glob($file_osencoded) as $filename) + { + if ($nophperrors) $ok=@unlink($filename); // The unlink encapsulated by dolibarr + else $ok=unlink($filename); // The unlink encapsulated by dolibarr if ($ok) dol_syslog("Removed file ".$filename, LOG_DEBUG); - else dol_syslog("Failed to remove file ".$filename, LOG_WARNING); - } - } - else - { - if ($nophperrors) $ok=@unlink($file_osencoded); // The unlink encapsulated by dolibarr - else $ok=unlink($file_osencoded); // The unlink encapsulated by dolibarr - if ($ok) { - dol_syslog("Removed file ".$file_osencoded, LOG_DEBUG); - } - else { - dol_syslog("Failed to remove file ".$file_osencoded, LOG_WARNING); - } - } - + else dol_syslog("Failed to remove file ".$filename, LOG_WARNING); + } + } + else + { + if ($nophperrors) $ok=@unlink($file_osencoded); // The unlink encapsulated by dolibarr + else $ok=unlink($file_osencoded); // The unlink encapsulated by dolibarr + if ($ok) dol_syslog("Removed file ".$file_osencoded, LOG_DEBUG); + else dol_syslog("Failed to remove file ".$file_osencoded, LOG_WARNING); + } + return $ok; } } From 71c25bb939c614823bbd017ad0a64ac9e243d2c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2012 13:01:20 +0200 Subject: [PATCH 016/152] Hide not frequently used third level menus entries. --- htdocs/core/menus/standard/eldy.lib.php | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 9bd599aab12..512c358b3c3 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -687,27 +687,27 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) // System tools $newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools'); - if ($leftmenu=="admintools") + if (preg_match('/^admintools/',$leftmenu)) { - $newmenu->add('/admin/system/dolibarr.php?mainmenu=home', $langs->trans('InfoDolibarr'), 1); - $newmenu->add('/admin/system/constall.php?mainmenu=home', $langs->trans('AllParameters'), 2); - $newmenu->add('/admin/system/modules.php?mainmenu=home', $langs->trans('Modules'), 2); - $newmenu->add('/admin/triggers.php?mainmenu=home', $langs->trans('Triggers'), 2); - $newmenu->add('/admin/system/os.php?mainmenu=home', $langs->trans('InfoOS'), 1); - $newmenu->add('/admin/system/web.php?mainmenu=home', $langs->trans('InfoWebServer'), 1); - $newmenu->add('/admin/system/phpinfo.php?mainmenu=home', $langs->trans('InfoPHP'), 1); + $newmenu->add('/admin/system/dolibarr.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('InfoDolibarr'), 1); + if ($leftmenu=='admintools_info') $newmenu->add('/admin/system/constall.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('AllParameters'), 2); + if ($leftmenu=='admintools_info') $newmenu->add('/admin/system/modules.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Modules'), 2); + if ($leftmenu=='admintools_info') $newmenu->add('/admin/triggers.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Triggers'), 2); + $newmenu->add('/admin/system/os.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoOS'), 1); + $newmenu->add('/admin/system/web.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoWebServer'), 1); + $newmenu->add('/admin/system/phpinfo.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoPHP'), 1); //if (function_exists('xdebug_is_enabled')) $newmenu->add('/admin/system/xdebug.php', $langs->trans('XDebug'),1); - $newmenu->add('/admin/system/database.php?mainmenu=home', $langs->trans('InfoDatabase'), 1); + $newmenu->add('/admin/system/database.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoDatabase'), 1); - $newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home", $langs->trans("Backup"),1); - $newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home", $langs->trans("Restore"),1); - $newmenu->add("/admin/tools/update.php?mainmenu=home", $langs->trans("MenuUpgrade"),1); - if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php?mainmenu=home", $langs->trans("EAccelerator"),1); - $newmenu->add("/admin/tools/listevents.php?mainmenu=home", $langs->trans("Audit"),1); - $newmenu->add("/admin/tools/listsessions.php?mainmenu=home", $langs->trans("Sessions"),1); - $newmenu->add("/admin/tools/purge.php?mainmenu=home", $langs->trans("Purge"),1); - $newmenu->add("/support/index.php?mainmenu=home", $langs->trans("HelpCenter"),1,1,'targethelp'); - $newmenu->add('/admin/system/about.php?mainmenu=home', $langs->trans('About'), 1); + $newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home&leftmenu=admintools", $langs->trans("Backup"),1); + $newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home&leftmenu=admintools", $langs->trans("Restore"),1); + $newmenu->add("/admin/tools/update.php?mainmenu=home&leftmenu=admintools", $langs->trans("MenuUpgrade"),1); + if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php?mainmenu=home&leftmenu=admintools", $langs->trans("EAccelerator"),1); + $newmenu->add("/admin/tools/listevents.php?mainmenu=home&leftmenu=admintools", $langs->trans("Audit"),1); + $newmenu->add("/admin/tools/listsessions.php?mainmenu=home&leftmenu=admintools", $langs->trans("Sessions"),1); + $newmenu->add("/admin/tools/purge.php?mainmenu=home&leftmenu=admintools", $langs->trans("Purge"),1); + $newmenu->add("/support/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("HelpCenter"),1,1,'targethelp'); + $newmenu->add('/admin/system/about.php?mainmenu=home&leftmenu=admintools', $langs->trans('About'), 1); } // Modules system tools if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) From 98092b952dd35db95fba18dd3eb62ff343e820c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Wed, 12 Sep 2012 14:49:02 +0200 Subject: [PATCH 017/152] Fixed xinputuser emailing module Lastname wasn't being recorded --- htdocs/core/modules/mailings/xinputuser.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php index 994bac804c4..12648f147fd 100644 --- a/htdocs/core/modules/mailings/xinputuser.modules.php +++ b/htdocs/core/modules/mailings/xinputuser.modules.php @@ -133,7 +133,7 @@ class mailing_xinputuser extends MailingTargets { $cibles[] = array( 'email' => $email, - 'name' => $name, + 'name' => $lastname, 'firstname' => $firstname, 'other' => $other, 'source_url' => '', From a2f1107bfc9faa7724f5d77f210c93c40650a04b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 12 Sep 2012 14:49:36 +0200 Subject: [PATCH 018/152] Fix: add GET in hook parameters --- htdocs/core/lib/files.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index fc4ebd4c25f..d6d076e2e3f 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -729,6 +729,7 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n $hookmanager->initHooks(array('fileslib')); $parameters=array( + 'GET' => $_GET, 'file' => $file, 'disableglob'=> $disableglob, 'nophperrors' => $nophperrors From aa9ef31f9d6022d45d9938b504952f944132a6b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Wed, 12 Sep 2012 14:51:21 +0200 Subject: [PATCH 019/152] Added Changelog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index a5b8e442b9e..52840dd2cc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -53,6 +53,7 @@ New experimental modules: - Fix: No images into product description lines as PDF generation does not work with this. - Fix: Errors weren't being shown in customer's & supplier's orders +- Fix: Lastname wasn't being recorded in xinputuser emailing module For developers: - New: Add webservice for thirdparty creation and list. From 664ceb7f2cdb4979bb2e128afca329593b4f100b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 12 Sep 2012 14:55:39 +0200 Subject: [PATCH 020/152] Fix: This is a 'superglobal', there is no need to do 'global $variable;' to access it within functions or methods. --- htdocs/core/lib/files.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index d6d076e2e3f..23ac28b8c11 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -994,7 +994,7 @@ function dol_init_file_process($pathtoscan='') */ function dol_add_file_process($upload_dir,$allowoverwrite=0,$donotupdatesession=0,$varfiles='addedfile') { - global $db,$user,$conf,$langs,$_FILES; + global $db,$user,$conf,$langs; if (! empty($_FILES[$varfiles])) // For view $_FILES[$varfiles]['error'] { From a663f8fb3bfe7da611807cb35513cc98af9fe273 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 12 Sep 2012 16:02:01 +0200 Subject: [PATCH 021/152] Fix: remove obsolete code --- htdocs/societe/document.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 2b68c5ad13f..edca64dfcf8 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -42,8 +42,7 @@ $ref = GETPOST('ref', 'alpha'); // Security check if ($user->societe_id > 0) { - unset($_GET["action"]); - $action=''; + unset($action); $socid = $user->societe_id; } $result = restrictedArea($user, 'societe', $id, '&societe'); @@ -188,8 +187,7 @@ if ($object->id) $formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?id='.$object->id,'',0,0,$user->rights->societe->creer,50,$object); // List of document - $param='&socid='.$object->id; - $formfile->list_of_documents($filearray,$object,'societe',$param); + $formfile->list_of_documents($filearray,$object,'societe'); print "

"; } From d5fc2a9488bec68fddc120de6532907d4749cad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Wed, 12 Sep 2012 16:11:16 +0200 Subject: [PATCH 022/152] Fixed incorrect BackToList link --- htdocs/comm/mailing/cibles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index fc9894caf6d..2081bda8cbb 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -178,7 +178,7 @@ if ($object->fetch($id) >= 0) print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; print ''; print ''; print '
'.$langs->trans("Ref").''; From f16a68bf01b69c8f6b309fe31f4c3aeb1fbd611a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 12 Sep 2012 16:38:27 +0200 Subject: [PATCH 023/152] Fix: remove unused tables --- .../install/mysql/migration/3.2.0-3.3.0.sql | 3 +- htdocs/install/mysql/tables/llx_document.sql | 29 ------------------ .../mysql/tables/llx_dolibarr_modules.key.sql | 19 ------------ .../mysql/tables/llx_dolibarr_modules.sql | 30 ------------------- 4 files changed, 2 insertions(+), 79 deletions(-) delete mode 100644 htdocs/install/mysql/tables/llx_document.sql delete mode 100644 htdocs/install/mysql/tables/llx_dolibarr_modules.key.sql delete mode 100644 htdocs/install/mysql/tables/llx_dolibarr_modules.sql diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql index a5e76b08b41..bb0ef5cf990 100755 --- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -16,6 +16,8 @@ -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); DROP TABLE llx_product_ca; +DROP TABLE llx_document; +DROP TABLE llx_dolibarr_modules; ALTER TABLE llx_menu MODIFY COLUMN fk_mainmenu varchar(24); ALTER TABLE llx_menu MODIFY COLUMN fk_leftmenu varchar(24); @@ -220,4 +222,3 @@ ALTER TABLE llx_propaldet MODIFY COLUMN localtax2_type varchar(1); -- END TASK #204 ALTER TABLE llx_menu MODIFY COLUMN enabled varchar(255) NULL default '1'; -ALTER TABLE llx_document MODIFY COLUMN permissions varchar(9) DEFAULT 'rw-rw-rw'; diff --git a/htdocs/install/mysql/tables/llx_document.sql b/htdocs/install/mysql/tables/llx_document.sql deleted file mode 100644 index 0dc9cc376ec..00000000000 --- a/htdocs/install/mysql/tables/llx_document.sql +++ /dev/null @@ -1,29 +0,0 @@ --- =================================================================== --- Copyright (C) 2007 Rodolphe Quiedeville --- --- 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 --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . --- --- =================================================================== - -create table llx_document -( - rowid integer AUTO_INCREMENT PRIMARY KEY, - name varchar(255) NOT NULL, - file_name varchar(255) NOT NULL, - file_extension varchar(5) NOT NULL, - date_generation datetime NULL, - fk_owner integer NULL, - fk_group integer NULL, - permissions varchar(9) DEFAULT 'rw-rw-rw' -)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_dolibarr_modules.key.sql b/htdocs/install/mysql/tables/llx_dolibarr_modules.key.sql deleted file mode 100644 index a711ab7d9cc..00000000000 --- a/htdocs/install/mysql/tables/llx_dolibarr_modules.key.sql +++ /dev/null @@ -1,19 +0,0 @@ --- ============================================================================ --- Copyright (C) 2009 Regis Houssin --- --- 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 --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . --- --- =========================================================================== - -ALTER TABLE llx_dolibarr_modules ADD PRIMARY KEY pk_dolibarr_modules (numero, entity); diff --git a/htdocs/install/mysql/tables/llx_dolibarr_modules.sql b/htdocs/install/mysql/tables/llx_dolibarr_modules.sql deleted file mode 100644 index 50c86d2911a..00000000000 --- a/htdocs/install/mysql/tables/llx_dolibarr_modules.sql +++ /dev/null @@ -1,30 +0,0 @@ --- ======================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- Copyright (C) 2005-2009 Regis Houssin --- --- 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 --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . --- --- ======================================================================== - -create table llx_dolibarr_modules -( - numero integer, - entity integer DEFAULT 1 NOT NULL, -- multi company id - active tinyint DEFAULT 0 NOT NULL, - active_date datetime NOT NULL, - active_version varchar(25) NOT NULL - -)ENGINE=innodb; - - From a7ddbf8f10eb689e105078666a12c4d1f2918b69 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2012 16:56:30 +0200 Subject: [PATCH 024/152] Use key value if translation not found --- htdocs/admin/dict.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index fccf5896951..0037d0ae855 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -863,11 +863,11 @@ if ($id) $valuetoshow=$obj->$fieldlist[$field]; if ($value == 'element') { - $valuetoshow = $elementList[$valuetoshow]; + $valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow; } else if ($value == 'source') { - $valuetoshow = $sourceList[$valuetoshow]; + $valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow; } else if ($valuetoshow=='all') { $valuetoshow=$langs->trans('All'); From 41078019dd85143180b04729405078ad32191d21 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2012 17:24:39 +0200 Subject: [PATCH 025/152] Make demo of foundation at end --- htdocs/public/demo/index.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index d244baa0ba9..778ffea3bc0 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -43,12 +43,6 @@ $hookmanager=new HookManager($db); $hookmanager->initHooks(array('demo')); $demoprofiles=array( - array('default'=>'-1', 'key'=>'profdemofun','label'=>'DemoFundation', - 'disablemodules'=>'banque,barcode,boutique,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,facture,ficheinter,fournisseur,mailmanspip,prelevement,product,projet,propal,propale,service,societe,stock,tax', - 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png'), - array('default'=>'0', 'key'=>'profdemofun2','label'=>'DemoFundation2', - 'disablemodules'=>'barcode,boutique,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,facture,ficheinter,fournisseur,mailmanspip,prelevement,product,projet,propal,propale,service,societe,stock,tax', - 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png'), array('default'=>'1', 'key'=>'profdemoservonly','label'=>'DemoCompanyServiceOnly', 'disablemodules'=>'adherent,barcode,boutique,cashdesk,categorie,don,expedition,externalsite,mailmanspip,prelevement,product,stock', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot8.png'), @@ -60,8 +54,14 @@ $demoprofiles=array( 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot2.png'), array('default'=>'0', 'key'=>'profdemoall','label'=>'DemoCompanyAll', 'disablemodules'=>'adherent,boutique,don,externalsite,mailmanspip', - 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot9.png') - ); + 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot9.png'), + array('default'=>'-1', 'key'=>'profdemofun','label'=>'DemoFundation', + 'disablemodules'=>'banque,barcode,boutique,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,facture,ficheinter,fournisseur,mailmanspip,prelevement,product,projet,propal,propale,service,societe,stock,tax', + 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png'), + array('default'=>'0', 'key'=>'profdemofun2','label'=>'DemoFundation2', + 'disablemodules'=>'barcode,boutique,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,facture,ficheinter,fournisseur,mailmanspip,prelevement,product,projet,propal,propale,service,societe,stock,tax', + 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png') +); $tmpaction = 'view'; From be174c6b4608b108d1d64b4f17101f1136f1ff4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Wed, 12 Sep 2012 17:32:14 +0200 Subject: [PATCH 026/152] Fixed problem with accentuated strings --- htdocs/comm/mailing/fiche.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 39bdc5f1ec7..7fa1160d43d 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -440,9 +440,9 @@ if ($action == 'add') $object->bgcolor = trim($_POST["bgcolor"]); $object->bgimage = trim($_POST["bgimage"]); - if (! $object->titre) $mesg.=($mesg?'
':'').$langs->trans("ErrorFieldRequired",$langs->trans("MailTitle")); - if (! $object->sujet) $mesg.=($mesg?'
':'').$langs->trans("ErrorFieldRequired",$langs->trans("MailTopic")); - if (! $object->body) $mesg.=($mesg?'
':'').$langs->trans("ErrorFieldRequired",$langs->trans("MailBody")); + if (! $object->titre) $mesg.=($mesg?'
':'').$langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTitle")); + if (! $object->sujet) $mesg.=($mesg?'
':'').$langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTopic")); + if (! $object->body) $mesg.=($mesg?'
':'').$langs->trans("ErrorFieldRequired",$langs->transnoentities("MailMessage")); if (! $mesg) { @@ -526,8 +526,8 @@ if ($action == 'update' && empty($_POST["removedfile"]) && empty($_POST["cancel" $object->bgcolor = trim($_POST["bgcolor"]); $object->bgimage = trim($_POST["bgimage"]); - if (! $object->sujet) $mesg.=($mesg?'
':'').$langs->trans("ErrorFieldRequired",$langs->trans("MailTopic")); - if (! $object->body) $mesg.=($mesg?'
':'').$langs->trans("ErrorFieldRequired",$langs->trans("MailBody")); + if (! $object->sujet) $mesg.=($mesg?'
':'').$langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTopic")); + if (! $object->body) $mesg.=($mesg?'
':'').$langs->trans("ErrorFieldRequired",$langs->transnoentities("MailMessage")); if (! $mesg) { From dd66ebd3f65bda41588e88bba070646391827093 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2012 17:39:02 +0200 Subject: [PATCH 027/152] New: Use GB address format --- htdocs/core/lib/functions.lib.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 91c4ea4b088..160970b3aae 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -723,12 +723,12 @@ function dol_get_fiche_end($notab=0) function dol_format_address($object) { $ret=''; - $countriesusingstate=array('US','IN'); + $countriesusingstate=array('US','IN','GB'); // Address $ret .= $object->address; // Zip/Town/State - if (in_array($object->country_code,array('US'))) // US: town, state, zip + if (in_array($object->country_code,array('US'))) // US: title firstname name \n address lines \n town, state, zip \n country { $ret .= ($ret ? "\n" : '' ).$object->town; if ($object->state && in_array($object->country_code,$countriesusingstate)) @@ -737,7 +737,16 @@ function dol_format_address($object) } if ($object->zip) $ret .= ', '.$object->zip; } - else // Other: zip town, state + else if (in_array($object->country_code,array('GB'))) // UK: title firstname name \n address lines \n town state \n zip \n country + { + $ret .= ($ret ? "\n" : '' ).$object->town; + if ($object->state && in_array($object->country_code,$countriesusingstate)) + { + $ret.=", ".$object->departement; + } + if ($object->zip) $ret .= ($ret ? "\n" : '' ).$object->zip; + } + else // Other: title firstname name \n address lines \n zip town \n country { $ret .= ($ret ? "\n" : '' ).$object->zip; $ret .= ' '.$object->town; From 2e37084c556ae18788778946f1aff5777a03818e Mon Sep 17 00:00:00 2001 From: simnandez Date: Wed, 12 Sep 2012 17:48:45 +0200 Subject: [PATCH 028/152] Fix: If price is 'TTC' we need to have the totals without VAT for a correct calculation Fix: The updateline of propal must include the localtaxes totals --- htdocs/comm/propal/class/propal.class.php | 2 ++ htdocs/core/lib/price.lib.php | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 44d3c2f3f68..a548153f91d 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2780,6 +2780,8 @@ class PropaleLigne $sql.= " , total_ht=".price2num($this->total_ht).""; $sql.= " , total_tva=".price2num($this->total_tva).""; $sql.= " , total_ttc=".price2num($this->total_ttc).""; + $sql.= " , total_localtax1=".price2num($this->total_localtax1).""; + $sql.= " , total_localtax2=".price2num($this->total_localtax2).""; } $sql.= " , fk_product_fournisseur_price='".$this->fk_fournprice."'"; $sql.= " , buy_price_ht='".price2num($this->pa_ht)."'"; diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index 8e7d951514c..189e02b2cd0 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -164,6 +164,14 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $localtax1 // if there's some localtax without vat, we calculate localtaxes (we will add them at end) $apply_tax = false; + + //If price is 'TTC' we need to have the totals without VAT for a correct calculation + if ($price_base_type=='TTC') + { + $tot_sans_remise= price2num($tot_sans_remise / (1 + ($txtva / 100)),'MU'); + $tot_avec_remise= price2num($tot_avec_remise / (1 + ($txtva / 100)),'MU'); + } + switch($localtax1_type) { case '1': // localtax on product or service $apply_tax = true; @@ -176,6 +184,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $localtax1 break; } if ($apply_tax) { + $result[14] = price2num(($tot_sans_remise * (1 + ( $localtax1_rate / 100))) - $tot_sans_remise, 'MT'); // amount tax1 for total_ht_without_discount $result[8] += $result[14]; // total_ttc_without_discount + tax1 From 28e5ba6c18adf7d3eb2cf581c3a5d7e2739a888b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 12 Sep 2012 18:47:06 +0200 Subject: [PATCH 029/152] Fix: mini strict mode --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b6de06ce26b..bf577e76229 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2664,7 +2664,7 @@ abstract class CommonObject } $text.= ' - '.(! empty($line->label)?$line->label:$label); - $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->description)); + $description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($line->description)); } // Output template part (modules that overwrite templates must declare this into descriptor) From 4ac2ee83f2c1c4da7b303d948be6450d8d60c0f7 Mon Sep 17 00:00:00 2001 From: simnandez Date: Wed, 12 Sep 2012 19:07:23 +0200 Subject: [PATCH 030/152] Localtaxes also in skip_update_total comprobation --- htdocs/commande/class/commande.class.php | 6 +++--- htdocs/compta/facture/class/facture.class.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index a38422cd0eb..71a863b6e07 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2010-2012 Juanjo Menent * Copyright (C) 2011 Jean Heimburger * Copyright (C) 2012 Christophe Battarel * @@ -3140,11 +3140,11 @@ class OrderLine $sql.= " , total_ht=".price2num($this->total_ht).""; $sql.= " , total_tva=".price2num($this->total_tva).""; $sql.= " , total_ttc=".price2num($this->total_ttc).""; + $sql.= " , total_localtax1=".price2num($this->total_localtax1); + $sql.= " , total_localtax2=".price2num($this->total_localtax2); } $sql.= " , fk_product_fournisseur_price=".(! empty($this->fk_fournprice)?$this->fk_fournprice:"null"); $sql.= " , buy_price_ht='".price2num($this->pa_ht)."'"; - $sql.= " , total_localtax1=".price2num($this->total_localtax1); - $sql.= " , total_localtax2=".price2num($this->total_localtax2); $sql.= " , info_bits=".$this->info_bits; $sql.= " , date_start=".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null"); $sql.= " , date_end=".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null"); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index dbf3bd849cb..3ec0b1576e7 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -7,7 +7,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2010-2012 Juanjo Menent * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2012 Marcos García * @@ -3446,11 +3446,11 @@ class FactureLigne $sql.= ",total_ht=".price2num($this->total_ht).""; $sql.= ",total_tva=".price2num($this->total_tva).""; $sql.= ",total_ttc=".price2num($this->total_ttc).""; + $sql.= ",total_localtax1=".price2num($this->total_localtax1).""; + $sql.= ",total_localtax2=".price2num($this->total_localtax2).""; } $sql.= " , fk_product_fournisseur_price='".$this->fk_fournprice."'"; $sql.= " , buy_price_ht='".price2num($this->pa_ht)."'"; - $sql.= ",total_localtax1=".price2num($this->total_localtax1).""; - $sql.= ",total_localtax2=".price2num($this->total_localtax2).""; $sql.= ",fk_parent_line=".($this->fk_parent_line>0?$this->fk_parent_line:"null"); if (! empty($this->rang)) $sql.= ", rang=".$this->rang; $sql.= " WHERE rowid = ".$this->rowid; From cb4044755b2318ecbc77f8170e5a7784a6d26ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Wed, 12 Sep 2012 19:11:03 +0200 Subject: [PATCH 031/152] Fixed export translations Added missing strings Corrected some translations --- htdocs/core/modules/modCategorie.class.php | 6 +++--- htdocs/core/modules/modCommande.class.php | 4 ++-- htdocs/core/modules/modFacture.class.php | 2 +- htdocs/core/modules/modFournisseur.class.php | 2 +- htdocs/core/modules/modProduct.class.php | 2 +- htdocs/core/modules/modPropale.class.php | 2 +- htdocs/core/modules/modSociete.class.php | 4 ++-- htdocs/core/modules/modUser.class.php | 2 +- htdocs/exports/export.php | 1 + htdocs/langs/el_GR/exports.lang | 22 ++++++++++---------- htdocs/langs/en_US/exports.lang | 2 +- htdocs/langs/en_US/mails.lang | 4 ++-- htdocs/langs/en_US/suppliers.lang | 3 ++- htdocs/langs/es_ES/admin.lang | 2 +- htdocs/langs/es_ES/languages.lang | 4 +++- htdocs/langs/es_ES/mails.lang | 12 +++++++++++ htdocs/langs/es_ES/main.lang | 4 ++-- htdocs/langs/es_ES/orders.lang | 5 ++++- htdocs/langs/es_ES/stocks.lang | 2 +- htdocs/langs/es_ES/suppliers.lang | 5 +++-- 20 files changed, 55 insertions(+), 35 deletions(-) diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index bc18fa78ecb..00e2ebfc5d7 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -109,7 +109,7 @@ class modCategorie extends DolibarrModules $this->export_icon[$r]='category'; $this->export_enabled[$r]='$conf->fournisseur->enabled'; $this->export_permission[$r]=array(array("categorie","lire"),array("fournisseur","lire")); - $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"IdProf1",'s.siren'=>"IdProf2",'s.ape'=>"IdProf3",'s.idprof4'=>"IdProf4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note"); + $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"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'=>"Note"); $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.ville'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company"); // We define here only fields that use another picto $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_fournisseur as cf, '.MAIN_DB_PREFIX.'societe as s LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as ce ON s.fk_effectif = ce.id LEFT JOIN '.MAIN_DB_PREFIX.'c_forme_juridique as cfj ON s.fk_forme_juridique = cfj.code'; @@ -123,7 +123,7 @@ class modCategorie extends DolibarrModules $this->export_icon[$r]='category'; $this->export_enabled[$r]='$conf->societe->enabled'; $this->export_permission[$r]=array(array("categorie","lire"),array("societe","lire")); - $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"IdProf1",'s.siren'=>"IdProf2",'s.ape'=>"IdProf3",'s.idprof4'=>"IdProf4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus'); + $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"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'=>"Note",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus'); $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.ville'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company",'s.fk_prospectlevel'=>'company','s.fk_stcomm'=>'company'); // We define here only fields that use another picto $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_societe as cf, '.MAIN_DB_PREFIX.'societe as s LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as ce ON s.fk_effectif = ce.id LEFT JOIN '.MAIN_DB_PREFIX.'c_forme_juridique as cfj ON s.fk_forme_juridique = cfj.code'; @@ -151,7 +151,7 @@ class modCategorie extends DolibarrModules $this->export_icon[$r]='category'; $this->export_enabled[$r]='$conf->adherent->enabled'; $this->export_permission[$r]=array(array("categorie","lire"),array("adherent","lire")); - $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'MemberId','p.nom'=>'Name','p.prenom'=>'Firstname'); + $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'MemberId','p.nom'=>'LastName','p.prenom'=>'Firstname'); $this->export_entities_array[$r]=array('p.rowid'=>'member','p.nom'=>'member','p.prenom'=>'member'); // We define here only fields that use another picto $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_member as cp, '.MAIN_DB_PREFIX.'adherent as p'; diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index 784f8e8ec08..bf8cc381db5 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -71,7 +71,7 @@ class modCommande extends DolibarrModules $this->depends = array("modSociete"); $this->requiredby = array("modExpedition"); $this->conflictwith = array(); - $this->langfiles = array("orders","bills","companies","products"); + $this->langfiles = array('orders', 'bills', 'companies','products', 'deliveries'); // Constantes $this->const = array(); @@ -173,7 +173,7 @@ class modCommande extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='CustomersOrdersAndOrdersLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("commande","commande","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"DateOrder",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"OrderShortStatusInvoicee",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Linelabel",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"OrderDate",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"Billed",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>"order",'c.note'=>"order",'c.date_livraison'=>"order",'cd.rowid'=>'order_line','cd.label'=>"order_line",'cd.description'=>"order_line",'cd.product_type'=>'order_line','cd.tva_tx'=>"order_line",'cd.qty'=>"order_line",'cd.total_ht'=>"order_line",'cd.total_tva'=>"order_line",'cd.total_ttc'=>"order_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('order_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 3dbf8fbcbad..656298bbc36 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -174,7 +174,7 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"LineLabel",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('invoice_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/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 873445fd57b..116ff2c8283 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -68,7 +68,7 @@ class modFournisseur extends DolibarrModules // Dependances $this->depends = array("modSociete"); $this->requiredby = array(); - $this->langfiles = array("bills","companies","suppliers"); + $this->langfiles = array('bills', 'companies', 'suppliers', 'orders'); // Config pages $this->config_page_url = array("fournisseur.php"); diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index c74985bca44..528096343ab 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -140,7 +140,7 @@ class modProduct extends DolibarrModules $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.customcode'=>'CustomCode','p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.tobuy'=>"OnBuy",'p.datec'=>'DateCreation','p.tms'=>'DateModification'); //if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge ($this->export_fields_array[$r],array('p.stock'=>'Stock','p.pmp'=>'PMPValue')); if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.pmp'=>'PMPValue')); - if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.barcode'=>'Barcode')); + if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.barcode'=>'BarCode')); $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.label'=>"product",'p.description'=>"product",'p.accountancy_code_sell'=>'product','p.accountancy_code_sell'=>'product','p.note'=>"product",'p.length'=>"product",'p.surface'=>"product",'p.volume'=>"product",'p.weight'=>"product",'p.customcode'=>'product','p.price_base_type'=>"product",'p.price'=>"product",'p.price_ttc'=>"product",'p.tva_tx'=>"product",'p.tosell'=>"product",'p.tobuy'=>"product",'p.datec'=>"product",'p.tms'=>"product"); //if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge ($this->export_entities_array[$r],array('p.stock'=>'product','p.pmp'=>'product')); if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.pmp'=>'product')); diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index 4fda2079c46..de004794807 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -169,7 +169,7 @@ class modPropale extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='ProposalsAndProposalsLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("propale","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','cp.code'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"LineLabel",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','cp.code'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','cp.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.label'=>"propal_line",'cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('propal_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 603c7bb8798..3fb3633ee64 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -248,7 +248,7 @@ class modSociete extends DolibarrModules $this->export_label[$r]='ExportDataset_company_1'; $this->export_icon[$r]='company'; $this->export_permission[$r]=array(array("societe","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siret'=>"IdProf1",'s.siren'=>"IdProf2",'s.ape'=>"IdProf3",'s.idprof4'=>"IdProf4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Effectif","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State'); + $this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State'); if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix'; $this->export_entities_array[$r]=array(); // We define here only fields that use another picto // Add extra fields @@ -320,7 +320,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.cp'=>"Zip",'s.ville'=>"Town",'s.fk_pays'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"IdProf1",'s.siren'=>"IdProf2",'s.ape'=>"IdProf3",'s.idprof4'=>"IdProf4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Effectif","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.cp'=>"Zip",'s.ville'=>"Town",'s.fk_pays'=>"CountryCode",'s.tel'=>"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'=>"Note",'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 FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'"; $resql=$this->db->query($sql); diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index 63829e38963..8fcc8631e37 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -210,7 +210,7 @@ class modUser extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='Liste des utilisateurs Dolibarr et attributs'; $this->export_permission[$r]=array(array("user","user","export")); - $this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.login'=>"Login",'u.name'=>"Lastname",'u.firstname'=>"Firstname",'u.office_phone'=>'Tel','u.office_fax'=>'Fax','u.email'=>'EMail','u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Admin",'u.statut'=>'Status','u.note'=>"Note",'u.datelastlogin'=>'LastConnexion','u.datepreviouslogin'=>'PreviousConnexion','u.fk_socpeople'=>"IdContact",'u.fk_societe'=>"IdCompany",'u.fk_member'=>"MemberId"); + $this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.login'=>"Login",'u.name'=>"Lastname",'u.firstname'=>"Firstname",'u.office_phone'=>'Telephone','u.office_fax'=>'Fax','u.email'=>'EMail','u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Admin",'u.statut'=>'Status','u.note'=>"Note",'u.datelastlogin'=>'LastConnexion','u.datepreviouslogin'=>'PreviousConnexion','u.fk_socpeople'=>"IdContact",'u.fk_societe'=>"IdCompany",'u.fk_member'=>"MemberId"); $this->export_entities_array[$r]=array('u.rowid'=>"user",'u.login'=>"user",'u.name'=>"user",'u.firstname'=>"user",'u.office_phone'=>'user','u.office_fax'=>'user','u.email'=>'user','u.datec'=>"user",'u.tms'=>"user",'u.admin'=>"user",'u.statut'=>'user','u.note'=>"user",'u.datelastlogin'=>'user','u.datepreviouslogin'=>'user','u.fk_socpeople'=>"contact",'u.fk_societe'=>"company",'u.fk_member'=>"member"); if (empty($conf->adherent->enabled)) { diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index d69e300a28d..b5ca329ab93 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -79,6 +79,7 @@ $entitytolang = array( 'account' => 'BankTransactions', 'payment' => 'Payment', 'product' => 'Product', + 'service' => 'Service', 'stock' => 'Stock', 'warehouse' => 'Warehouse', 'category' => 'Category', diff --git a/htdocs/langs/el_GR/exports.lang b/htdocs/langs/el_GR/exports.lang index a3765906804..9486c36dfb6 100644 --- a/htdocs/langs/el_GR/exports.lang +++ b/htdocs/langs/el_GR/exports.lang @@ -8,7 +8,7 @@ ExportableDatas=Exportable dataset ImportableDatas=Importable dataset SelectExportDataSet=Choose dataset you want to export... SelectImportDataSet=Choose dataset you want to import... -SelectExportFields=Choose fields you want to export, or select a predefined export profil +SelectExportFields=Choose fields you want to export, or select a predefined export profile SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: NotImportedFields=Fields of source file not imported SaveExportModel=Save this export profile if you plan to reuse it later... @@ -106,13 +106,13 @@ DataIsInsertedInto=Data coming from source file will be inserted into the follow DataIDSourceIsInsertedInto=The id of parent object found using the data in source file, will be inserted into the following field: SourceRequired=Data value is mandatory SourceExample=Example of possible data value -CSVFormatDesc=Comma Separated Value file format (.csv).
This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. - -// START - Lines generated via autotranslator.php tool (2012-02-29 16:06:57). -// Reference language: en_US -> el_GR -FileWasImported=Αρχείο εισήχθη με %s αριθμό. -DataComeFromIdFoundFromCodeId=Ο κώδικας που προέρχεται από %s αριθμό πεδίο του αρχείου προέλευσης θα πρέπει να χρησιμοποιούνται για την εύρεση της ταυτότητας αντικειμένου μητρική εταιρία να χρησιμοποιήσει (Έτσι ο κώδικας από το αρχείο προέλευσης πρέπει να υπάρχει σε dictionnary %s). Σημειώστε ότι αν γνωρίζετε το αναγνωριστικό, μπορείτε επίσης να το χρησιμοποιήσετε στο αρχείο προέλευσης αντί του κώδικα. Εισαγωγή θα πρέπει να εργαστεί και στις δύο περιπτώσεις. -DataCodeIDSourceIsInsertedInto=Η ταυτότητα του γονέα που βρέθηκαν γραμμή από τον κώδικα, θα πρέπει να προστεθεί στο παρακάτω πεδίο: -ExampleAnyRefFoundIntoElement=Κάθε σχ βρέθηκαν για %s στοιχείο -ExampleAnyCodeOrIdFoundIntoDictionnary=Κάθε κωδικός (ή id) βρέθηκαν σε dictionnary %s -// STOP - Lines generated via autotranslator.php tool (2012-02-29 16:07:39). +CSVFormatDesc=Comma Separated Value file format (.csv).
This is a text file format where fields are separated by separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. + +// START - Lines generated via autotranslator.php tool (2012-02-29 16:06:57). +// Reference language: en_US -> el_GR +FileWasImported=Αρχείο εισήχθη με %s αριθμό. +DataComeFromIdFoundFromCodeId=Ο κώδικας που προέρχεται από %s αριθμό πεδίο του αρχείου προέλευσης θα πρέπει να χρησιμοποιούνται για την εύρεση της ταυτότητας αντικειμένου μητρική εταιρία να χρησιμοποιήσει (Έτσι ο κώδικας από το αρχείο προέλευσης πρέπει να υπάρχει σε dictionnary %s). Σημειώστε ότι αν γνωρίζετε το αναγνωριστικό, μπορείτε επίσης να το χρησιμοποιήσετε στο αρχείο προέλευσης αντί του κώδικα. Εισαγωγή θα πρέπει να εργαστεί και στις δύο περιπτώσεις. +DataCodeIDSourceIsInsertedInto=Η ταυτότητα του γονέα που βρέθηκαν γραμμή από τον κώδικα, θα πρέπει να προστεθεί στο παρακάτω πεδίο: +ExampleAnyRefFoundIntoElement=Κάθε σχ βρέθηκαν για %s στοιχείο +ExampleAnyCodeOrIdFoundIntoDictionnary=Κάθε κωδικός (ή id) βρέθηκαν σε dictionnary %s +// STOP - Lines generated via autotranslator.php tool (2012-02-29 16:07:39). diff --git a/htdocs/langs/en_US/exports.lang b/htdocs/langs/en_US/exports.lang index f8bae403577..a9dcefd568e 100644 --- a/htdocs/langs/en_US/exports.lang +++ b/htdocs/langs/en_US/exports.lang @@ -8,7 +8,7 @@ ExportableDatas=Exportable dataset ImportableDatas=Importable dataset SelectExportDataSet=Choose dataset you want to export... SelectImportDataSet=Choose dataset you want to import... -SelectExportFields=Choose fields you want to export, or select a predefined export profil +SelectExportFields=Choose fields you want to export, or select a predefined export profile SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil: NotImportedFields=Fields of source file not imported SaveExportModel=Save this export profile if you plan to reuse it later... diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 57c56785c70..f9c0d0f198f 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -44,7 +44,7 @@ MailingStatusSentCompletely=Sent completely MailingStatusError=Error MailingStatusNotSent=Not sent MailSuccessfulySent=Email successfully sent (from %s to %s) -MailingSuccessfullyValidated=EMail validated +MailingSuccessfullyValidated=EMailing successfully validated MailUnsubcribe=Unsubscribe Unsuscribe=Unsubscribe MailingStatusNotContact=Don't contact anymore @@ -116,7 +116,7 @@ NbOfEMailingsReceived=Mass emailings received IdRecord=ID record DeliveryReceipt=Delivery Receipt YouCanUseCommaSeparatorForSeveralRecipients=You can use the comma separator to specify several recipients. -TagCheckMail=Tracker mail opened +TagCheckMail=Track mail opening TagUnsubscribe=Unsubscribe link TagSignature=Signature sending user TagMailtoEmail=Recipient EMail diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index 2121d80dbea..fd5a35d3f53 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -25,8 +25,9 @@ SupplierPayment=Supplier payment SuppliersArea=Suppliers area RefSupplierShort=Ref. supplier Availability=Availability -ExportDataset_fournisseur_1=Supplier invoices list and invoice's lines +ExportDataset_fournisseur_1=Supplier invoices list and invoice lines ExportDataset_fournisseur_2=Supplier invoices and payments +ExportDataset_fournisseur_3=Supplier orders and order lines ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s ? DenyingThisOrder=Denying this order diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index bebbcaabf3c..dc0af998df7 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -394,7 +394,7 @@ Module59Desc=Añade función para generar una cuenta Bookmark4u desde una cuenta Module70Name=Intervenciones Module70Desc=Gestión de las intervenciones a terceros Module75Name=Notas de gasto y desplazamientos -Module75Desc=Gestión de las notas de gastos y desplazamientos +Module75Desc=Gestión de las notas de gasto y desplazamientos Module80Name=Expediciones Module80Desc=Gestión de expediciones y recepciones Module85Name=Bancos y cajas diff --git a/htdocs/langs/es_ES/languages.lang b/htdocs/langs/es_ES/languages.lang index 8d124eccf05..41128cb4c3f 100644 --- a/htdocs/langs/es_ES/languages.lang +++ b/htdocs/langs/es_ES/languages.lang @@ -3,6 +3,7 @@ CHARSET=UTF-8 Language_ar_AR=Árabe Language_ar_SA=Árabe +Language_bg_BG=Búlgaro Language_ca_ES=Catalán Language_da_DA=Danés Language_da_DK=Danés @@ -12,7 +13,7 @@ Language_el_GR=Griego Language_en_AU=Inglés (Australia) Language_en_GB=Inglés (Reino Unido) Language_en_IN=Inglés (India) -Language_en_NZ=Anglais (Nueva Zelanda) +Language_en_NZ=Inglés (Nueva Zelanda) Language_en_US=Inglés (Estados Unidos) Language_es_ES=Español Language_es_AR=Español (Argentina) @@ -26,6 +27,7 @@ Language_fr_BE=Francés (Bélgica) Language_fr_CA=Francés (Canadá) Language_fr_CH=Francés (Suiza) Language_fr_FR=Francés +Language_he_IL=Hebreo Language_hu_HU=Húngaro Language_is_IS=Islandés Language_it_IT=Italiano diff --git a/htdocs/langs/es_ES/mails.lang b/htdocs/langs/es_ES/mails.lang index ea5d7bec1df..c5c0336c7a5 100644 --- a/htdocs/langs/es_ES/mails.lang +++ b/htdocs/langs/es_ES/mails.lang @@ -44,6 +44,7 @@ MailingStatusSentCompletely=Enviado completamente MailingStatusError=Error MailingStatusNotSent=No enviado MailSuccessfulySent=E-Mail enviado correctamente (de %s a %s) +MailingSuccessfullyValidated=E-mailing validado correctamente MailUnsubcribe=Desuscribe Unsuscribe=Desuscribe ErrorMailRecipientIsEmpty=La dirección del destinatario está vacía @@ -88,6 +89,7 @@ MailingModuleDescDolibarrContractsLinesExpired=Terceros con líneas de contratos MailingModuleDescContactsByCompanyCategory=Contactos de terceros (por categoría de terceros) MailingModuleDescMembersCategories=Miembros (por categoría) MailingModuleDescContactsByFunction=Contactos de terceros (por puesto/función) +MailingModuleDescEmailsFromUser=E-mails introducidos por el usuario (email;apellidos;nombre;otros) LineInFile=Línea %s en archivo RecipientSelectionModules=Módulos de selección de los destinatarios MailSelectedRecipients=Destinatarios seleccionados @@ -111,6 +113,16 @@ NbOfEMailingsReceived=E-Mailings en masa recibidos IdRecord=ID registro DeliveryReceipt=Acuso de recibo YouCanUseCommaSeparatorForSeveralRecipients=Puede usar el carácter de separación coma para especificar múltiples destinatarios. +TagMailtoEmail=Email del destinatario +TagSignature=Firma del usuario remitente +TagUnsubscribe=Link de desuscripción +TagCheckMail=Seguimiento de la apertura del email +Other1=Otros1 +Other2=Otros2 +Other3=Otros3 +Other4=Otros4 +Other5=Otros5 + # Module Notifications= Notifications=Notificaciones NoNotificationsWillBeSent=Ninguna notificación por e-mail está prevista para este evento y empresa diff --git a/htdocs/langs/es_ES/main.lang b/htdocs/langs/es_ES/main.lang index 6dfb16f1d43..140b25c161e 100644 --- a/htdocs/langs/es_ES/main.lang +++ b/htdocs/langs/es_ES/main.lang @@ -131,8 +131,8 @@ Save=Grabar SaveAs=Grabar como TestConnection=Probar la conexión ToClone=Copiar -ConfirmClone=Selecciones datos que desea copiar. -NoCloneOptionsSpecified=no hay datos definidos para copiar +ConfirmClone=Seleccione los datos que desea copiar: +NoCloneOptionsSpecified=No hay datos definidos para copiar Of=de Go=Ir CopyOf=Copia de diff --git a/htdocs/langs/es_ES/orders.lang b/htdocs/langs/es_ES/orders.lang index fff6666111c..dbb0c07a98d 100644 --- a/htdocs/langs/es_ES/orders.lang +++ b/htdocs/langs/es_ES/orders.lang @@ -19,7 +19,7 @@ SuppliersOrdersRunning=Pedidos a proveedor en curso CustomerOrder=Pedido de cliente CustomersOrders=Pedidos de clientes CustomersOrdersRunning=Pedidos de cliente en curso -CustomersOrdersAndOrdersLines=Pedidos de cliente y líneas de pedido +CustomersOrdersAndOrdersLines=Pedidos de clientes y líneas de pedido OrdersToValid=Pedidos de clientes a validar OrdersToBill=Pedidos de clientes a facturar OrdersInProcess=Pedidos de clientes en proceso @@ -151,3 +151,6 @@ OrderByFax=Fax OrderByEMail=E-Mail OrderByWWW=En línea OrderByPhone=Teléfono + +#Export +#ExportDataset_fournisseur_3=Pedidos de proveedores y líneas de pedido \ No newline at end of file diff --git a/htdocs/langs/es_ES/stocks.lang b/htdocs/langs/es_ES/stocks.lang index 061d01ed587..919564f7100 100644 --- a/htdocs/langs/es_ES/stocks.lang +++ b/htdocs/langs/es_ES/stocks.lang @@ -68,7 +68,7 @@ StockUpShort=Stock máx. IdWarehouse=Id. almacén DescWareHouse=Descripción almacén LieuWareHouse=Localización almacén -WarehousesAndProducts=almacenes y productos +WarehousesAndProducts=Almacenes y productos AverageUnitPricePMPShort=Precio medio ponderado (PMP) AverageUnitPricePMP=Precio Medio Ponderado (PMP) de adquisición SellPriceMin=Precio de venta unitario diff --git a/htdocs/langs/es_ES/suppliers.lang b/htdocs/langs/es_ES/suppliers.lang index 7789e4bce54..a03eccb719f 100644 --- a/htdocs/langs/es_ES/suppliers.lang +++ b/htdocs/langs/es_ES/suppliers.lang @@ -10,7 +10,7 @@ NewSupplier=Nuevo proveedor History=Histórico ListOfSuppliers=Listado de proveedores ShowSupplier=Mostrar proveedor -OrderDate=Data pedido +OrderDate=Fecha de pedido BuyingPrice=Precio de compra BuyingPriceMin=Precio mínimo de compra BuyingPriceMinShort=Precio mín compra @@ -24,8 +24,9 @@ SupplierPayment=Pago a proveedor SuppliersArea=Área proveedores RefSupplierShort=Ref. proveedor Availability=Disponibilidad -ExportDataset_fournisseur_1=Facturas de proveedores y lineas de factura +ExportDataset_fournisseur_1=Facturas de proveedores y líneas de factura ExportDataset_fournisseur_2=Facturas proveedores y pagos +ExportDataset_fournisseur_3=Pedidos de proveedores y líneas de pedido ApproveThisOrder=Aprobar este pedido ConfirmApproveThisOrder=¿Está seguro de querer aprobar el pedido a proveedor %s? DenyingThisOrder=Denegar este pedido From 5770245805c40ec0dbd96905f397ab26ebfdf514 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 12 Sep 2012 19:37:37 +0200 Subject: [PATCH 032/152] Fix: rename the hook --- htdocs/core/lib/files.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 23ac28b8c11..b020febd3b0 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -660,7 +660,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable $hookmanager->initHooks(array('fileslib')); $parameters=array('filename' => $file_name, 'varfiles' => $varfiles, 'allowoverwrite' => $allowoverwrite); - $reshook=$hookmanager->executeHooks('dolMoveUploadedFile', $parameters, $object); + $reshook=$hookmanager->executeHooks('moveUploadedFile', $parameters, $object); } if (empty($reshook)) From c38274c111e19c26dc9b729678d59bb1fd4525ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Wed, 12 Sep 2012 20:32:39 +0200 Subject: [PATCH 033/152] Forgot to remove some lines... --- htdocs/langs/es_ES/orders.lang | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/htdocs/langs/es_ES/orders.lang b/htdocs/langs/es_ES/orders.lang index dbb0c07a98d..70a226023e8 100644 --- a/htdocs/langs/es_ES/orders.lang +++ b/htdocs/langs/es_ES/orders.lang @@ -150,7 +150,4 @@ OrderByMail=Correo OrderByFax=Fax OrderByEMail=E-Mail OrderByWWW=En línea -OrderByPhone=Teléfono - -#Export -#ExportDataset_fournisseur_3=Pedidos de proveedores y líneas de pedido \ No newline at end of file +OrderByPhone=Teléfono \ No newline at end of file From 91e304d0d77fa29017c2b0d7e0c5334988d585fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2012 20:33:50 +0200 Subject: [PATCH 034/152] Move dev and experimental modules into a separated tab --- htdocs/admin/modules.php | 75 +++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 65ea4f5a700..8a9d779e9af 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -37,6 +37,8 @@ $action=GETPOST('action'); if (!$user->admin) accessforbidden(); +$specialtostring=array(0=>'common', 1=>'interfaces', 2=>'other', 3=>'functional', 4=>'marketplace'); + /* * Actions @@ -150,17 +152,22 @@ foreach ($modulesdir as $dir) // We discard modules according to features level (PS: if module is activated we always show it) $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod))); - if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && empty($conf->global->$const_name)) $modulequalified=0; - if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && empty($conf->global->$const_name)) $modulequalified=0; + if ($objMod->version == 'development' && ($mode != 'expdev' || ($conf->global->MAIN_FEATURES_LEVEL < 2 && empty($conf->global->$const_name)))) $modulequalified=0; + if ($objMod->version == 'experimental' && ($mode != 'expdev' || ($conf->global->MAIN_FEATURES_LEVEL < 1 && empty($conf->global->$const_name)))) $modulequalified=0; + //if ($mode == 'expdev' && ($objMod->version != 'experimental' && $objMod->version != 'development')) $modulequalified=0; + // Define array $categ with categ with at least one qualified module if ($modulequalified) { $modules[$i] = $objMod; $filename[$i]= $modName; - $orders[$i] = $objMod->family."_".$j; // Tri par famille puis numero module - //print "x".$modName." ".$orders[$i]."\n
"; - if (isset($categ[$objMod->special])) $categ[$objMod->special]++; // Array of all different modules categories - else $categ[$objMod->special]=1; + $orders[$i] = $objMod->family."_".$j; // Sort by family, then by module number + $special = isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown'; + if ($mode == 'expdev' && ($objMod->version == 'development' || $objMod->version == 'experimental')) $special='expdev'; + + //print "x".$modName." ".$orders[$i]." ".$special."\n
"; + if (isset($categ[$special])) $categ[$special]++; // Array of all different modules categories + else $categ[$special]=1; $dirmod[$i] = $dir; $j++; $i++; @@ -188,12 +195,13 @@ asort($orders); //var_dump($modules); // Start to show page - -if ($mode==0) { $tagmode = 'common'; print $langs->trans("ModulesDesc")."
\n"; } -if ($mode==2) { $tagmode = 'other'; print $langs->trans("ModulesSpecialDesc")."
\n"; } -if ($mode==1) { $tagmode = 'interfaces'; print $langs->trans("ModulesInterfaceDesc")."
\n"; } -if ($mode==3) { $tagmode = 'functional'; print $langs->trans("ModulesJobDesc")."
\n"; } -if ($mode==4) { $tagmode = 'marketplace'; print $langs->trans("ModulesMarketPlaceDesc")."
\n"; } +$tagmode=$mode; +if ($mode=='common') print $langs->trans("ModulesDesc")."
\n"; +if ($mode=='other') print $langs->trans("ModulesSpecialDesc")."
\n"; +if ($mode=='interfaces') print $langs->trans("ModulesInterfaceDesc")."
\n"; +if ($mode=='functional') print $langs->trans("ModulesJobDesc")."
\n"; +if ($mode=='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."
\n"; +if ($mode=='expdev') print $langs->trans("ModuleFamilyExperimental")."
\n"; $nbofactivatedmodules=count($conf->modules); print $langs->trans("TotalNumberOfActivatedModules",($nbofactivatedmodules-1)); @@ -204,7 +212,7 @@ print "
\n"; $h = 0; -$categidx=0; // Main +$categidx='common'; // Main if (! empty($categ[$categidx])) { $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; @@ -213,7 +221,7 @@ if (! empty($categ[$categidx])) $h++; } -$categidx=2; // Other +$categidx='other'; // Other if (! empty($categ[$categidx])) { $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; @@ -222,7 +230,7 @@ if (! empty($categ[$categidx])) $h++; } -$categidx=1; // Interfaces +$categidx='interfaces'; // Interfaces if (! empty($categ[$categidx])) { $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; @@ -231,7 +239,7 @@ if (! empty($categ[$categidx])) $h++; } -$categidx=3; // Not used +$categidx='functional'; // Not used if (! empty($categ[$categidx])) { $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; @@ -240,15 +248,21 @@ if (! empty($categ[$categidx])) $h++; } -$categidx=4; -//if (! empty($categ[$categidx])) -//{ - $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; - $head[$h][1] = $langs->trans("ModulesMarketPlaces"); - $head[$h][2] = 'marketplace'; - $h++; -//} +if ($conf->global->MAIN_FEATURES_LEVEL >= 1) +{ + $categidx='expdev'; + $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; + $head[$h][1] = $langs->trans("ModuleFamilyExperimental"); + $head[$h][2] = 'expdev'; + $h++; +} +$categidx='marketplace'; +$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; +$head[$h][1] = $langs->trans("ModulesMarketPlaces"); +$head[$h][2] = 'marketplace'; +$h++; + dol_fiche_head($head, $tagmode, $langs->trans("Modules")); @@ -256,7 +270,7 @@ dol_fiche_head($head, $tagmode, $langs->trans("Modules")); dol_htmloutput_errors($mesg); -if ($mode != 4) +if ($mode != 'marketplace') { print "\n"; //print "\n"; @@ -271,7 +285,7 @@ if ($mode != 4) print "\n"; - // Affichage liste modules + // Show list of modules $var=true; $oldfamily=''; @@ -295,9 +309,11 @@ if ($mode != 4) $modName = $filename[$key]; $objMod = $modules[$key]; - //var_dump($objMod); - if ($objMod->special != $mode) continue; // Discard if not for tab + //print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."
"; + if (($mode != (isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown') && $mode != 'expdev') + || ($mode == 'expdev' && $objMod->version != 'development' && $objMod->version != 'experimental')) continue; // Discard if not for current tab + if (! $objMod->getName()) { dol_syslog("Error for module ".$key." - Property name of module looks empty", LOG_WARNING); @@ -327,8 +343,6 @@ if ($mode != 4) //print ""; } - if ($objMod->special == $mode) - { $atleastoneforfamily++; if ($family!=$oldfamily) @@ -453,7 +467,6 @@ if ($mode != 4) } print "\n"; - } } print "
yy".$oldfamily."-".$family."-".$atleastoneforfamily."
\n"; From c11c3897efa0711a45d9a3fdd9ea4a99d8635ff7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2012 20:45:01 +0200 Subject: [PATCH 035/152] Qual: Uniformize code --- htdocs/commissions/admin/commissions.php | 8 +++++++- htdocs/holiday/admin/holiday.php | 3 ++- htdocs/margin/admin/margin.php | 12 +++++++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/htdocs/commissions/admin/commissions.php b/htdocs/commissions/admin/commissions.php index 66911efc924..ee93165b6a5 100644 --- a/htdocs/commissions/admin/commissions.php +++ b/htdocs/commissions/admin/commissions.php @@ -39,6 +39,7 @@ if (GETPOST('commissionBase')) if (dolibarr_set_const($db, 'COMMISSION_BASE', GETPOST('commissionBase'), 'string', 0, '', $conf->entity) > 0) { $conf->global->COMMISSION_BASE = GETPOST('commissionBase'); + setEventMessage($langs->trans("RecordModifiedSuccessfully")); } else { @@ -154,10 +155,15 @@ print '
'; -print '
'; print ''; +dol_fiche_end(); + +dol_htmloutput_events(); + + +print '
'; llxFooter(); $db->close(); diff --git a/htdocs/holiday/admin/holiday.php b/htdocs/holiday/admin/holiday.php index 4c2844af408..df5fdd52384 100644 --- a/htdocs/holiday/admin/holiday.php +++ b/htdocs/holiday/admin/holiday.php @@ -33,7 +33,8 @@ require_once DOL_DOCUMENT_ROOT. '/user/class/usergroup.class.php'; $action=GETPOST('action'); -$langs->load("holiday"); +$langs->load("admin"); +$langs->load("holiday"); // Si pas administrateur if (! $user->admin) accessforbidden(); diff --git a/htdocs/margin/admin/margin.php b/htdocs/margin/admin/margin.php index dc401d61f45..66c0d96266a 100644 --- a/htdocs/margin/admin/margin.php +++ b/htdocs/margin/admin/margin.php @@ -70,6 +70,7 @@ if ($action == 'remises') if (dolibarr_set_const($db, 'MARGIN_METHODE_FOR_DISCOUNT', $_POST['MARGIN_METHODE_FOR_DISCOUNT'], 'chaine', 0, '', $conf->entity) > 0) { $conf->global->MARGIN_METHODE_FOR_DISCOUNT = $_POST['MARGIN_METHODE_FOR_DISCOUNT']; + setEventMessage($langs->trans("RecordModifiedSuccessfully")); } else { @@ -82,6 +83,7 @@ if ($action == 'typemarges') if (dolibarr_set_const($db, 'MARGIN_TYPE', $_POST['MARGIN_TYPE'], 'chaine', 0, '', $conf->entity) > 0) { $conf->global->MARGIN_METHODE_FOR_DISCOUNT = $_POST['MARGIN_TYPE']; + setEventMessage($langs->trans("RecordModifiedSuccessfully")); } else { @@ -134,7 +136,7 @@ if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '2') print '/>'; print ''; print ''; -print ''; +print ''; print ''; print ''.$langs->trans('MARGIN_TYPE_DETAILS').''; print ''; @@ -222,7 +224,7 @@ print ""; print ''; print ''.$langs->trans("MARGIN_METHODE_FOR_DISCOUNT").''; print ''; -print ''; print '