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

This commit is contained in:
Laurent Destailleur 2013-12-19 20:57:24 +01:00
commit acc4850d20
15 changed files with 164 additions and 25 deletions

View File

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

View File

@ -422,14 +422,14 @@ if ($result)
{
if($num<$limit){
$var=!$var;
print '<tr class="liste_total"><td align="left">'.$langs->trans("Total HT").'</td>';
print '<tr class="liste_total"><td align="left">'.$langs->trans("TotalHT").'</td>';
print '<td colspan="6" align="right"">'.price($total).'<td colspan="3"</td>';
print '</tr>';
}
else
{
$var=!$var;
print '<tr class="liste_total"><td align="left">'.$langs->trans("Total HT for this page").'</td>';
print '<tr class="liste_total"><td align="left">'.$langs->trans("TotalHTforthispage").'</td>';
print '<td colspan="6" align="right"">'.price($total).'<td colspan="3"</td>';
print '</tr>';
}

View File

@ -267,14 +267,14 @@ foreach ($data as $val)
{ // If we have empty year
$oldyear--;
print '<tr height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.'">'.$oldyear.'</a></td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
print '<td align="right">0</td>';
print '<td align="right">0</td>';
print '<td align="right">0</td>';
print '</tr>';
}
print '<tr height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'">'.$year.'</a></td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
print '<td align="right">'.$val['nb'].'</td>';
print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
print '<td align="right">'.price(price2num($val['avg'],'MT'),1).'</td>';

View File

@ -288,7 +288,7 @@ foreach ($data as $val)
{ // If we have empty year
$oldyear--;
print '<tr height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.'">'.$oldyear.'</a></td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
print '<td align="right">0</td>';
print '<td align="right">0</td>';
@ -297,7 +297,7 @@ foreach ($data as $val)
}
print '<tr height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.'">'.$year.'</a></td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
print '<td align="right">'.$val['nb'].'</td>';
print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
print '<td align="right">'.price(price2num($val['avg'],'MT'),1).'</td>';

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
*
* 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 '<tr height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.'">'.$oldyear.'</a></td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
print '<td align="right">0</td>';
print '<td align="right">0</td>';
print '<td align="right">0</td>';
print '</tr>';
}
print '<tr height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.'">'.$year.'</a></td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
print '<td align="right">'.$val['nb'].'</td>';
print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
print '<td align="right">'.price(price2num($val['avg'],'MT'),1).'</td>';

View File

@ -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 "</table>\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 '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post" name="formsoc">';
print '<input type="hidden" name="action" value="update_extras">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
}
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 '<tr><td';
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
print '>'.$label.'</td><td colspan="5">';
// 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 '</td></tr>'."\n";
}
}
if(count($extrafields->attribute_label) > 0) {
if ($action == 'edit_extras' && $user->rights->fournisseur->commande->creer)
{
print '<tr><td></td><td colspan="5">';
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
print '</form>';
print '</td></tr>';
}
else {
if ($object->statut == 0 && $user->rights->fournisseur->commande->creer)
{
print '<tr><td></td><td><a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit_extras">'.img_picto('','edit').' '.$langs->trans('Modify').'</a></td></tr>';
}
}
}
}
// Ligne de 3 colonnes
print '<tr><td>'.$langs->trans("AmountHT").'</td>';
print '<td align="right"><b>'.price($object->total_ht).'</b></td>';

View File

@ -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 "<strong>%s</strong>" (otherwise "%s")
OriginFileName=Original filename
SetDemandReason=Set source
ViewPrivateNote=View notes
# Week day
Monday=Monday
Tuesday=Tuesday

View File

@ -299,7 +299,7 @@ ServerNotAvailableOnIPOrPort=Servidor no disponible en la dirección <b>%s</b> 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).<br>Este debe ser el valor octal (por ejemplo, 0666 significa lectura / escritura para todos).<br>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

View File

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

View File

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

View File

@ -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:<br>El método 1 consiste en redondear el IVA en cada línea y luego sumarlo .<br>El método 2 consiste en sumar el IVA de cada línea y luego redondear el resultado.<br>El resultado final puede variar unos céntimos. El modo por defecto es el método <b>%s</b>.
# 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 <b>cash accountancy</b> mode is not relevant. This report is only available when using <b>engagement accountancy</b> 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 <b>contabilidad de caja</b> no es definible. Este informe solo está disponible en modo contabilidad llamada <b>contabilidad de compromiso</b> (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

View File

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

View File

@ -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 "<strong>%s</strong>" (sino "%s")
OriginFileName=Nombre del archivo origen
SetDemandReason=Definir origen
ViewPrivateNote=Ver notas
# Week day
Monday=Lunes

View File

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

View File

@ -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 "<strong>%s</strong>" (sinon "%s")
OriginFileName=nom du fichier source
SetDemandReason=Définir l'origine
ViewPrivateNote=Voir notes
# Week day
Monday=Lundi