diff --git a/ChangeLog b/ChangeLog index aed7dd1ca92..40d6e9ff31b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -86,6 +86,7 @@ For users: - Fix: [ bug #992 ] Proforma invoices don't have a separated numeric count. - Fix: [ bug #1022 ] correct margin calculation for credit notes. - Fix: Better management of using ajax for upload form (to solve problem when enabling ajax jquery multifile upload in some cases). +- Fix: Lost stats filters into year selection. New experimental module: - New: [ task #157 ] Add a Skype button (adherents / third parties / contacts) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 280da52f6c5..262ccbfe91e 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -422,14 +422,14 @@ if ($result) { if($num<$limit){ $var=!$var; - print ''.$langs->trans("Total HT").''; + print ''.$langs->trans("TotalHT").''; print ''.price($total).''; print ''; } else { $var=!$var; - print ''.$langs->trans("Total HT for this page").''; + print ''.$langs->trans("TotalHTforthispage").''; print ''.price($total).''; print ''; } diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index b3b8379afc3..e0805d385e6 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -267,14 +267,14 @@ foreach ($data as $val) { // If we have empty year $oldyear--; print ''; - print ''.$oldyear.''; + print '0?'&userid='.$userid:'').'">'.$oldyear.''; print '0'; print '0'; print '0'; print ''; } print ''; - print ''.$year.''; + print '0?'&userid='.$userid:'').'">'.$year.''; print ''.$val['nb'].''; print ''.price(price2num($val['total'],'MT'),1).''; print ''.price(price2num($val['avg'],'MT'),1).''; diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 31cb0566934..a7b51fb5fb0 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -288,7 +288,7 @@ foreach ($data as $val) { // If we have empty year $oldyear--; print ''; - print ''.$oldyear.''; + print '0?'&userid='.$userid:'').'">'.$oldyear.''; print '0'; print '0'; @@ -297,7 +297,7 @@ foreach ($data as $val) } print ''; - print ''.$year.''; + print '0?'&userid='.$userid:'').'">'.$year.''; print ''.$val['nb'].''; print ''.price(price2num($val['total'],'MT'),1).''; print ''.price(price2num($val['avg'],'MT'),1).''; diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 211bc355cc6..51747fe04d2 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2006 Rodolphe Quiedeville * Copyright (c) 2004-2012 Laurent Destailleur * Copyright (C) 2012 Marcos García + * Copyright (C) 2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -266,14 +267,14 @@ foreach ($data as $val) { // If we have empty year $oldyear--; print ''; - print ''.$oldyear.''; + print '0?'&userid='.$userid:'').'">'.$oldyear.''; print '0'; print '0'; print '0'; print ''; } print ''; - print ''.$year.''; + print '0?'&userid='.$userid:'').'">'.$year.''; print ''.$val['nb'].''; print ''.price(price2num($val['total'],'MT'),1).''; print ''.price(price2num($val['avg'],'MT'),1).''; diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 8c87e754bc4..5ac8438f2ad 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -75,6 +75,10 @@ $result = restrictedArea($user, 'fournisseur', $id, '', 'commande'); $hookmanager->initHooks(array('ordersuppliercard')); $object = new CommandeFournisseur($db); +$extrafields = new ExtraFields($db); + +// fetch optionals attributes and labels +$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); // Load object if ($id > 0 || ! empty($ref)) @@ -692,6 +696,46 @@ else if ($action == 'remove_file' && $object->id > 0 && $user->rights->fournisse else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); } +elseif ($action == 'update_extras') +{ + // Fill array 'array_options' with data from add form + $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); + $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + + if($ret < 0) + $error++; + + if(!$error) { + + // Actions on extra fields (by external module or standard code) + // FIXME le hook fait double emploi avec le trigger !! + $hookmanager->initHooks(array('supplierorderdao')); + $parameters=array('id'=>$object->id); + + $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks + + if (empty($reshook)) + { + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + { + + $result=$object->insertExtraFields(); + + if ($result < 0) + { + $error++; + } + + } + } + else if ($reshook < 0) $error++; + } + else + { + $action = 'edit_extras'; + } +} + /* * Create an order */ @@ -718,6 +762,9 @@ else if ($action == 'add' && $user->rights->fournisseur->commande->creer) $object->note_private = GETPOST('note_private'); $object->note_public = GETPOST('note_public'); + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + $id = $object->create($user); if ($id < 0) { @@ -1072,7 +1119,12 @@ if ($action=="create") // Other options $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - + + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + print $object->showOptionals($extrafields,'edit'); + } + // Bouton "Create Draft" print "\n"; @@ -1089,7 +1141,9 @@ elseif (! empty($object->id)) $title=$langs->trans("SupplierOrder"); dol_fiche_head($head, 'card', $title, 0, 'order'); - + + $res=$object->fetch_optionals($object->id,$extralabels); + /* * Confirmation de la suppression de la commande */ @@ -1355,6 +1409,69 @@ elseif (! empty($object->id)) $parameters=array('socid'=>$socid, 'colspan' => ' colspan="3"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + if ($action == 'edit_extras') + { + print '
'; + print ''; + print ''; + print ''; + } + + foreach($extrafields->attribute_label as $key=>$label) + { + if ($action == 'edit_extras') { + $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); + } else { + $value=$object->array_options["options_".$key]; + } + + if ($extrafields->attribute_type[$key] == 'separate') + { + print $extrafields->showSeparator($key); + } + else + { + print 'attribute_required[$key])) print ' class="fieldrequired"'; + print '>'.$label.''; + // Convert date into timestamp format + if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) + { + $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]); + } + + if ($action == 'edit_extras' && $user->rights->fournisseur->commande->creer) + { + print $extrafields->showInputField($key,$value); + } + else + { + print $extrafields->showOutputField($key,$value); + } + + print ''."\n"; + } + } + + if(count($extrafields->attribute_label) > 0) { + if ($action == 'edit_extras' && $user->rights->fournisseur->commande->creer) + { + print ''; + print ''; + print ''; + print ''; + } + else { + if ($object->statut == 0 && $user->rights->fournisseur->commande->creer) + { + print ''.img_picto('','edit').' '.$langs->trans('Modify').''; + } + } + } + } + // Ligne de 3 colonnes print ''.$langs->trans("AmountHT").''; print ''.price($object->total_ht).''; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 89b05f25f9a..4465b660cf6 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -311,6 +311,7 @@ SubTotal=Subtotal TotalHTShort=Total (net) TotalTTCShort=Total (inc. tax) TotalHT=Total (net of tax) +TotalHTforthispage=Total (net of tax) for this page TotalTTC=Total (inc. tax) TotalTTCToYourCredit=Total (inc. tax) to your credit TotalVAT=Total tax @@ -664,7 +665,7 @@ HelpCopyToClipboard=Use Ctrl+C to copy to clipboard SaveUploadedFileWithMask=Save file on server with name "%s" (otherwise "%s") OriginFileName=Original filename SetDemandReason=Set source - +ViewPrivateNote=View notes # Week day Monday=Monday Tuesday=Tuesday diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index eb0c81e4108..05fd7432c3e 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -299,7 +299,7 @@ ServerNotAvailableOnIPOrPort=Servidor no disponible en la dirección %s e DoTestServerAvailability=Probar conectividad con el servidor DoTestSend=Probar envío DoTestSendHTML=Probar envío HTML -# ErrorCantUseRazIfNoYearInMask=Error, can't use option @ to reset counter each year if sequence {yy} or {yyyy} is not in mask. +ErrorCantUseRazIfNoYearInMask=Error, no se puede usar la opción @ para reiniciar el contador anualmente si no se encuentra en la máscara la secuencia {yy} o {yyyy} ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Error, no se puede usar la opción @ si la secuencia {yy}{mm} o {yyyy}{mm} no se encuentra en la máscara. UMask=Parámetro UMask de nuevos archivos en Unix/Linux/BSD. UMaskExplanation=Este parámetro determina los derechos de los archivos creados en el servidor Dolibarr (durante la subida, por ejemplo).
Este debe ser el valor octal (por ejemplo, 0666 significa lectura / escritura para todos).
Este parámetro no tiene ningún efecto sobre un servidor Windows. @@ -381,7 +381,6 @@ KeepEmptyToUseDefault=Deje este campo vacío para usar el valor por defecto DefaultLink=Enlace por defecto ValueOverwrittenByUserSetup=Atención: Este valor puede ser sobreescrito por un valor específico de la configuración del usuario (cada usuario puede tener su propia url clicktodial) ExternalModule=Módulo externo - Instalado en el directorio %s - # Modules Module0Name=Usuarios y grupos Module0Desc=Gestión de usuarios y grupos @@ -1009,8 +1008,9 @@ XDebugInstalled=XDebug está cargado. XCacheInstalled=XCache está cargado AddRefInList=Mostrar el código de cliente/proveedor en los listados (lista desplegable o autoselección) en la mayoría de enlaces FieldEdition=Edición del campo %s -# FixTZ=TimeZone fix -# FillThisOnlyIfRequired=Example: +2 (fill only if timezone offset problems are experienced) +FixTZ=Ajueste TimeZone +FillThisOnlyIfRequired=Ejemplo: +2 (Rellene únicamente si se experimentan problemas de offset de zona horaria) + ##### Module password generation PasswordGenerationStandard=Devuelve una contraseña generada por el algoritmo interno Dolibarr: 8 caracteres, números y caracteres en minúsculas mezcladas. PasswordGenerationNone=No ofrece contraseñas. La contraseña se introduce manualmente. @@ -1273,7 +1273,6 @@ FilesOfTypeNotCompressed=Archivos de tipo %s no son comprimidos por el servidor CacheByServer=Caché mediante el servidor CacheByClient=Caché mediante el navegador CompressionOfResources=Compresión de las respuestas HTTP -TestNotPossibleWithCurrentBrowsers=La detección automática no es posible con el navegador actual ##### Products ##### ProductSetup=Configuración del módulo Productos ServiceSetup=Configuración del módulo Servicios diff --git a/htdocs/langs/es_ES/banks.lang b/htdocs/langs/es_ES/banks.lang index bf9908db4c8..efbad983ac3 100644 --- a/htdocs/langs/es_ES/banks.lang +++ b/htdocs/langs/es_ES/banks.lang @@ -150,3 +150,9 @@ EventualyAddCategory=Eventualmente, indique una categoría en la que clasificar ToConciliate=¿A conciliar? ThenCheckLinesAndConciliate=A continuación, compruebe las líneas presentes en el extracto bancario y haga clic BankDashboard=Resumen cuentas bancarias +DefaultRIB=IBAN por defecto +AllRIB=Todos los IBAN +LabelRIB=Nombre del IBAN +NoBANRecord=Sin IBAN registrados +DeleteARib=Eliminar IBAN registrado +ConfirmDeleteRib=¿Está seguro de querer eliminar este IBAN? diff --git a/htdocs/langs/es_ES/companies.lang b/htdocs/langs/es_ES/companies.lang index dd1dd71cc9f..d7502d1f720 100644 --- a/htdocs/langs/es_ES/companies.lang +++ b/htdocs/langs/es_ES/companies.lang @@ -399,9 +399,9 @@ InActivity=Activo ActivityCeased=Cerrado ActivityStateFilter=Estado de actividad ProductsIntoElements=Listado de productos en %s -# CurrentOutstandingBill=Current outstanding bill -OutstandingBill=Importe máximo para facturas pendientes -OutstandingBillReached=Importe máximo alcanzado +CurrentOutstandingBill=Riesgo alcanzado +OutstandingBill=Riesgo máximo +OutstandingBillReached=Riesgo máximo alcanzado # Monkey MonkeyNumRefModelDesc=Devuelve un número bajo el formato %syymm-nnnn para los códigos de clientes y %syymm-nnnn para los códigos de los proveedores, donde yy es el año, mm el mes y nnnn un contador secuencial sin ruptura y sin volver a 0. # Leopard diff --git a/htdocs/langs/es_ES/compta.lang b/htdocs/langs/es_ES/compta.lang index b156eeac698..3d9936520b3 100644 --- a/htdocs/langs/es_ES/compta.lang +++ b/htdocs/langs/es_ES/compta.lang @@ -30,6 +30,7 @@ Profit=Beneficio Balance=Saldo Debit=Debe Credit=Haber +Piece=Comprobante Withdrawal=Reintegro Withdrawals=Reintegros AmountHTVATRealReceived=Total repercutido @@ -147,7 +148,7 @@ DescPurchasesJournal=Diario de compras InvoiceRef=Ref. factura CodeNotDef=No definido AddRemind=Desglosar importe disponible -RemainToDivide= Resto a repartir : +RemainToDivide=Resto a repartir : WarningDepositsNotIncluded=Las facturas de anticipo aún no están incluidas en esta versión en el módulo de contabilidad. DatePaymentTermCantBeLowerThanObjectDate=La fecha límite de pago no puede ser inferior a la fecha del objeto Pcg_version=Versión del plan @@ -158,14 +159,20 @@ InvoiceDispatched=Facturas desglosadas AccountancyDashboard=Resumen financiero ByProductsAndServices=Por productos y servicios RefExt=Ref. externa -# ToCreateAPredefinedInvoice=To create a predefined invoice, create a standard invoice then, without validating it, click onto button "Convert to predefined invoice". -# LinkedOrder=linked to command +ToCreateAPredefinedInvoice=Para crear una factura predefinida, cree una factura estandard y, sin validarla, haga clic en el botón "Convertir en recurrente". +LinkedOrder=Enlazar a un pedido ReCalculate=Recalcular Mode1=Método 1 Mode2=Método 2 CalculationRuleDesc=Para calcular el IVA total hay 2 métodos:
El método 1 consiste en redondear el IVA en cada línea y luego sumarlo .
El método 2 consiste en sumar el IVA de cada línea y luego redondear el resultado.
El resultado final puede variar unos céntimos. El modo por defecto es el método %s. -# CalculationRuleDescSupplier=according to supplier, choose appropriate method to apply same calculation rule and get same result expected by your supplier. -# TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). +CalculationRuleDescSupplier=Según el modo usado por el proveedor, escoja el modo adecuado con el fin de aplicar la misma regla y obtener un resultado idéntico al modo aplicado por su proveedor. +TurnoverPerProductInCommitmentAccountingNotRelevant=El volumen de ventas por producto, en una contabilidad en modo contabilidad de caja no es definible. Este informe solo está disponible en modo contabilidad llamada contabilidad de compromiso (ver la configuración del módulo de contabilidad). CalculationMode=Modo de cálculo +COMPTA_PRODUCT_BUY_ACCOUNT=Código contable por defecto para las compras de mercaderías +COMPTA_PRODUCT_SOLD_ACCOUNT=Código contable por defecto para las ventas de mercaderías +COMPTA_SERVICE_BUY_ACCOUNT=Código contable por defecto para las compras de servicios +COMPTA_SERVICE_SOLD_ACCOUNT=Código contable por defecto para las ventas de servicios +COMPTA_VAT_ACCOUNT=Código contable por defecto para el IVA repercutido +COMPTA_VAT_BUY_ACCOUNT=Código contable por defecto para devengado COMPTA_ACCOUNT_CUSTOMER=Cuenta contable por defecto para clientes COMPTA_ACCOUNT_SUPPLIER=Cuenta contable por defecto para proveedores diff --git a/htdocs/langs/es_ES/languages.lang b/htdocs/langs/es_ES/languages.lang index 835c71a5025..dbbc4b8936e 100644 --- a/htdocs/langs/es_ES/languages.lang +++ b/htdocs/langs/es_ES/languages.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - languages - Language_ar_AR=Árabe Language_ar_SA=Árabe Language_bg_BG=Búlgaro @@ -53,6 +52,7 @@ Language_sl_SI=Esloveno Language_sv_SV=Sueco Language_sv_SE=Sueco Language_sk_SK=Eslovaco +Language_uz_UZ=Uzbeco Language_vi_VN=Vietnamita Language_zh_CN=Chino Language_zh_TW=Chino (Tradicional) diff --git a/htdocs/langs/es_ES/main.lang b/htdocs/langs/es_ES/main.lang index a3f4680db0c..49e9a94be4b 100644 --- a/htdocs/langs/es_ES/main.lang +++ b/htdocs/langs/es_ES/main.lang @@ -257,6 +257,8 @@ Seconds=Segundos Today=Hoy Yesterday=Ayer Tomorrow=Mañana +Morning=Mañana +Afternoon=Tarde Quadri=Trimestre MonthOfDay=Mes del día HourShort=H @@ -309,6 +311,7 @@ SubTotal=Subtotal TotalHTShort=Importe TotalTTCShort=Total TotalHT=Base imponible +TotalHTforthispage=Total base imponible para esta página TotalTTC=Total TotalTTCToYourCredit=Total a crédito TotalVAT=Total IVA @@ -662,6 +665,7 @@ HelpCopyToClipboard=Use Ctrl+C para copiar al portapapeles SaveUploadedFileWithMask=Guardar el archivo con el nombre "%s" (sino "%s") OriginFileName=Nombre del archivo origen SetDemandReason=Definir origen +ViewPrivateNote=Ver notas # Week day Monday=Lunes diff --git a/htdocs/langs/es_ES/stocks.lang b/htdocs/langs/es_ES/stocks.lang index a2e1ac97e94..49cd12c862b 100644 --- a/htdocs/langs/es_ES/stocks.lang +++ b/htdocs/langs/es_ES/stocks.lang @@ -110,3 +110,4 @@ MassStockMovement=Movimientos de stock en masa SelectProductInAndOutWareHouse=Selecccione un producto, una cantidad, un almacén origen y un almacén destino, seguidamente haga clic "%s". Una vez seleccionados todos los movimientos, haga clic en "%s". RecordMovement=Registrar transferencias ReceivingForSameOrder=Recepciones de este pedido +StockMovementRecorded=Movimientos de stock registrados diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index b553b648e36..de40bc94593 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -311,6 +311,7 @@ SubTotal=Sous-total TotalHTShort=Total HT TotalTTCShort=Total TTC TotalHT=Total HT +TotalHTforthispage=Total HT pour cette page TotalTTC=Total TTC TotalTTCToYourCredit=Total TTC à votre crédit TotalVAT=Total TVA @@ -664,6 +665,7 @@ HelpCopyToClipboard=Utilisez Ctrl+C pour copier dans le presse-papier SaveUploadedFileWithMask=Sauver le fichier sur le serveur sous le nom "%s" (sinon "%s") OriginFileName=nom du fichier source SetDemandReason=Définir l'origine +ViewPrivateNote=Voir notes # Week day Monday=Lundi