';
diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php
index a1e114430ce..f367149a19c 100644
--- a/htdocs/compta/bank/search.php
+++ b/htdocs/compta/bank/search.php
@@ -178,9 +178,10 @@ if ($resql)
print '
";
diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php
index 5583edbe357..0c2c62c052f 100644
--- a/htdocs/compta/bank/virement.php
+++ b/htdocs/compta/bank/virement.php
@@ -79,7 +79,7 @@ if ($action == 'add')
$accountto=new Account($db);
$accountto->fetch(GETPOST('account_to','int'));
- if ($accountto->id != $accountfrom->id)
+ if (($accountto->id != $accountfrom->id) && ($accountto->currency_code == $accountfrom->currency_code))
{
$db->begin();
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 75f829be46e..f1f92d01f3f 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -1076,7 +1076,7 @@ if (empty($reshook))
$lines[$i]->fetch_optionals($lines[$i]->rowid);
$array_options = $lines[$i]->array_options;
}
-
+
// View third's localtaxes for now
$localtax1_tx = get_localtax($lines[$i]->tva_tx, 1, $object->client);
$localtax2_tx = get_localtax($lines[$i]->tva_tx, 2, $object->client);
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index ac87f1e693d..db4c1fc5a03 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -1887,10 +1887,11 @@ abstract class CommonObject
* @param int $targetid Object target id
* @param string $targettype Object target type
* @param string $clause 'OR' or 'AND' clause used when both source id and target id are provided
+ * @param int $alsosametype 0=Return only links to different object than source. 1=Include also link to objects of same type.
* @return void
* @see add_object_linked, updateObjectLinked, deleteObjectLinked
*/
- function fetchObjectLinked($sourceid='',$sourcetype='',$targetid='',$targettype='',$clause='OR')
+ function fetchObjectLinked($sourceid='',$sourcetype='',$targetid='',$targettype='',$clause='OR',$alsosametype=1)
{
global $conf;
@@ -1924,7 +1925,7 @@ abstract class CommonObject
return -1;
}
- // Links beetween objects are stored in this table
+ // Links between objects are stored in table element_element
$sql = 'SELECT fk_source, sourcetype, fk_target, targettype';
$sql.= ' FROM '.MAIN_DB_PREFIX.'element_element';
$sql.= " WHERE ";
@@ -1983,7 +1984,7 @@ abstract class CommonObject
$classpath = $element.'/class';
- // To work with non standard path
+ // To work with non standard classpath or module name
if ($objecttype == 'facture') {
$classpath = 'compta/facture/class';
}
@@ -2019,7 +2020,7 @@ abstract class CommonObject
$classfile = 'fournisseur.commande'; $classname = 'CommandeFournisseur';
}
- if ($conf->$module->enabled && $element != $this->element)
+ if ($conf->$module->enabled && (($element != $this->element) || $alsosametype))
{
dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php
index 4ab3ce8f6fe..f94252d076d 100644
--- a/htdocs/core/class/events.class.php
+++ b/htdocs/core/class/events.class.php
@@ -31,7 +31,6 @@
/**
* Events class
- * Initialy built by build_class_from_table on 2008-02-28 17:25
*/
class Events // extends CommonObject
{
@@ -41,6 +40,8 @@ class Events // extends CommonObject
var $id;
var $db;
+ var $error;
+
var $tms;
var $type;
var $entity;
diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php
index 8a4ffd29d68..ff9f29f55ff 100644
--- a/htdocs/core/class/stats.class.php
+++ b/htdocs/core/class/stats.class.php
@@ -31,7 +31,7 @@ abstract class Stats
{
protected $db;
var $_lastfetchdate=array(); // Dates of cache file read by methods
- var $cachefilesuffix=''; // Suffix to add to name of cache file (to avoid file name conflicts)
+ var $cachefilesuffix=''; // Suffix to add to name of cache file (to avoid file name conflicts)
/**
* Return nb of elements by month for several years
@@ -76,7 +76,7 @@ abstract class Stats
dol_syslog(get_class($this).'::'.__FUNCTION__." cache file ".$newpathofdestfile." is not found or older than now - cachedelay (".$nowgmt." - ".$cachedelay.") so we can't use it.");
}
}
-
+
// Load file into $data
if ($foundintocache) // Cache file found and is not too old
{
@@ -203,11 +203,14 @@ abstract class Stats
dol_syslog(get_class($this).'::'.__FUNCTION__." save cache file ".$newpathofdestfile." onto disk.");
if (! dol_is_dir($conf->user->dir_temp)) dol_mkdir($conf->user->dir_temp);
$fp = fopen($newpathofdestfile, 'w');
- fwrite($fp, json_encode($data));
- fclose($fp);
- if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
- @chmod($newpathofdestfile, octdec($newmask));
-
+ if ($fp)
+ {
+ fwrite($fp, json_encode($data));
+ fclose($fp);
+ if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
+ @chmod($newpathofdestfile, octdec($newmask));
+ }
+ else dol_syslog("Failed to write cache file", LOG_ERR);
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
}
@@ -309,21 +312,23 @@ abstract class Stats
dol_syslog(get_class($this).'::'.__FUNCTION__." save cache file ".$newpathofdestfile." onto disk.");
if (! dol_is_dir($conf->user->dir_temp)) dol_mkdir($conf->user->dir_temp);
$fp = fopen($newpathofdestfile, 'w');
- fwrite($fp, json_encode($data));
- fclose($fp);
- if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
- @chmod($newpathofdestfile, octdec($newmask));
-
+ if ($fp)
+ {
+ fwrite($fp, json_encode($data));
+ fclose($fp);
+ if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
+ @chmod($newpathofdestfile, octdec($newmask));
+ }
$this->_lastfetchdate[get_class($this).'_'.__FUNCTION__]=$nowgmt;
}
return $data;
- }
-
-
+ }
+
+
// Here we have low level of shared code called by XxxStats.class.php
-
+
/**
* Return nb of elements by year
*
@@ -532,8 +537,8 @@ abstract class Stats
return $data;
}
-
-
+
+
/**
* Return number or total of product refs
*
@@ -544,7 +549,7 @@ abstract class Stats
function _getAllByProduct($sql, $limit=10)
{
global $langs;
-
+
$result=array();
$res=array();
@@ -567,6 +572,6 @@ abstract class Stats
else dol_print_error($this->db);
return $result;
- }
+ }
}
diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php
index a35ab95a24a..87e22ac8cc9 100644
--- a/htdocs/core/lib/product.lib.php
+++ b/htdocs/core/lib/product.lib.php
@@ -93,7 +93,7 @@ function product_prepare_head($object)
$head[$h][2] = 'referers';
$h++;
- if($object->isproduct()) // Si produit stockable
+ if ($object->isproduct() || ($object->isservice() && ! empty($conf->global->STOCK_SUPPORTS_SERVICES))) // If physical product we can stock (or service with option)
{
if (! empty($conf->stock->enabled) && $user->rights->stock->lire)
{
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 0d4b43c9172..828c7c359d1 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -371,7 +371,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
$taskstatic->id=$lines[$i]->id;
$taskstatic->ref=$lines[$i]->ref;
$taskstatic->label=($taskrole[$lines[$i]->id]?$langs->trans("YourRole").': '.$taskrole[$lines[$i]->id]:'');
- print $taskstatic->getNomUrl(1,($showproject?'':'withproject'));
+ print $taskstatic->getNomUrl(1,'withproject');
}
print '
';
@@ -504,9 +504,10 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
* @param string $tasksrole Array of roles user has on task
* @param string $mine Show only task lines I am assigned to
* @param int $restricteditformytask 0=No restriction, 1=Enable add time only if task is a task i am affected to
+ * @param int $preselectedday Preselected day
* @return $inc
*/
-function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask=0)
+function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask=0, $preselectedday='')
{
global $db, $user, $bc, $langs;
global $form, $formother, $projectstatic, $taskstatic;
@@ -527,6 +528,12 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
{
$var = !$var;
$lastprojectid=$lines[$i]->fk_project;
+
+ if ($preselectedday)
+ {
+ $projectstatic->id = $lines[$i]->fk_project;
+ $projectstatic->loadTimeSpent($preselectedday, 0, $fuser->id); // Load time spent into this->weekWorkLoad and this->weekWorkLoadPerTaks for all day of a week
+ }
}
// If we want all or we have a role on task, we show it
@@ -549,7 +556,7 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
// Ref
print '
';
@@ -2671,7 +2672,7 @@ elseif (! empty($object->id))
print 'id.'&action=reopen">'.$langs->trans("Disapprove").'';
}
}
- if (in_array($object->statut, array(5, 6, 7, 9)))
+ if (in_array($object->statut, array(3, 5, 6, 7, 9)))
{
if ($user->rights->fournisseur->commande->commander)
{
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index 84b03f1953a..bac6ace77e3 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -101,6 +101,23 @@ if ($action == 'uncheckdispatchline' &&
}
}
+if ($action == 'denydispatchline' &&
+ ! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner))
+ || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))
+)
+{
+ $supplierorderdispatch = new CommandeFournisseurDispatch($db);
+ $result=$supplierorderdispatch->fetch($lineid);
+ if (! $result) dol_print_error($db);
+ $result=$supplierorderdispatch->setStatut(2);
+ if ($result < 0)
+ {
+ setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors');
+ $error++;
+ $action='';
+ }
+}
+
if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
{
$commande = new CommandeFournisseur($db);
@@ -123,7 +140,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
if (GETPOST($qty) > 0) // We ask to move a qty
{
- if (! GETPOST($ent,'int') > 0)
+ if (! (GETPOST($ent,'int') > 0))
{
dol_syslog('No dispatch for line '.$key.' as no warehouse choosed');
$text = $langs->transnoentities('Warehouse').', '.$langs->transnoentities('Line').' ' .($numline);
@@ -133,7 +150,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
if (! $error)
{
- $result = $commande->DispatchProduct($user, GETPOST($prod,'int'),GETPOST($qty), GETPOST($ent,'int'), GETPOST($pu), GETPOST("comment"), '', '', '', GETPOST($fk_commandefourndet, 'int'), $notrigger);
+ $result = $commande->DispatchProduct($user, GETPOST($prod,'int'), GETPOST($qty), GETPOST($ent,'int'), GETPOST($pu), GETPOST("comment"), '', '', '', GETPOST($fk_commandefourndet, 'int'), $notrigger);
if ($result < 0)
{
setEventMessages($commande->error, $commande->errors, 'errors');
@@ -643,11 +660,13 @@ if ($id > 0 || ! empty($ref))
{
if (empty($objp->status))
{
- print ''.$langs->trans("Check").'';
+ print ''.$langs->trans("Approve").'';
+ print ''.$langs->trans("Deny").'';
}
else
{
- print ''.$langs->trans("Uncheck").'';
+ print ''.$langs->trans("Disapprove").'';
+ print ''.$langs->trans("Deny").'';
}
}
else
@@ -656,11 +675,18 @@ if ($id > 0 || ! empty($ref))
if ($commande->statut == 5) $disabled=1;
if (empty($objp->status))
{
- print 'dispatchlineid.'">'.$langs->trans("Check").'';
+ print 'dispatchlineid.'">'.$langs->trans("Approve").'';
+ print 'dispatchlineid.'">'.$langs->trans("Deny").'';
}
- else
+ if ($objp->status == 1)
{
- print 'dispatchlineid.'">'.$langs->trans("Uncheck").'';
+ print 'dispatchlineid.'">'.$langs->trans("Reinit").'';
+ print 'dispatchlineid.'">'.$langs->trans("Deny").'';
+ }
+ if ($objp->status == 2)
+ {
+ print 'dispatchlineid.'">'.$langs->trans("Reinit").'';
+ print 'dispatchlineid.'">'.$langs->trans("Approve").'';
}
}
print '';
diff --git a/htdocs/install/mysql/tables/llx_facture_rec.sql b/htdocs/install/mysql/tables/llx_facture_rec.sql
index cba4b580cf0..7c1151f36ca 100644
--- a/htdocs/install/mysql/tables/llx_facture_rec.sql
+++ b/htdocs/install/mysql/tables/llx_facture_rec.sql
@@ -50,9 +50,9 @@ create table llx_facture_rec
note_private text,
note_public text,
- usenewprice integer DEFAULT 0,
- frequency integer,
- unit_frequency varchar(2) DEFAULT 'd',
+ usenewprice integer DEFAULT 0, -- update invoice with current price of product instead of recorded price
+ frequency integer, -- frequency (for example: 3 for every 3 month)
+ unit_frequency varchar(2) DEFAULT 'm', -- 'm' for month (date_when must be a day <= 28), 'y' for year, ...
date_when datetime DEFAULT NULL, -- date for next gen (when an invoice is generated, this field must be updated with next date)
date_last_gen datetime DEFAULT NULL, -- date for last gen (date with last successfull generation of invoice)
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 37670b7f003..32a66564b07 100755
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -160,13 +160,16 @@ ErrorPriceExpressionInternal=Internal error '%s'
ErrorPriceExpressionUnknown=Unknown error '%s'
ErrorSrcAndTargetWarehouseMustDiffers=Source and target warehouses must differs
ErrorTryToMakeMoveOnProductRequiringBatchData=Error, trying to make a stock movement without batch/serial information, on a product requiring batch/serial information
-ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=All recorded receptions must first be verified before being allowed to do this action
+ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=All recorded receptions must first be verified (approved or denied) before being allowed to do this action
+ErrorCantSetReceptionToTotalDoneWithReceptionDenied=All recorded receptions must first be verified (approved) before being allowed to do this action
ErrorGlobalVariableUpdater0=HTTP request failed with error '%s'
ErrorGlobalVariableUpdater1=Invalid JSON format '%s'
ErrorGlobalVariableUpdater2=Missing parameter '%s'
ErrorGlobalVariableUpdater3=The requested data was not found in result
ErrorGlobalVariableUpdater4=SOAP client failed with error '%s'
ErrorGlobalVariableUpdater5=No global variable selected
+ErrorFieldMustBeANumeric=Field %s must be a numeric value
+ErrorFieldMustBeAnInteger=Field %s must be an integer
# Warnings
WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index bd2112cf871..52ab660e21b 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -220,6 +220,7 @@ Next=Next
Cards=Cards
Card=Card
Now=Now
+HourStart=Start hour
Date=Date
DateAndHour=Date and hour
DateStart=Date start
@@ -700,6 +701,7 @@ SelectElementAndClickRefresh=Select an element and click Refresh
PrintFile=Print File %s
ShowTransaction=Show transaction
GoIntoSetupToChangeLogo=Go into Home - Setup - Company to change logo or go into Home - Setup - Display to hide.
+Denied=Denied
# Week day
Monday=Monday
Tuesday=Tuesday
diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang
index 278fb39f0ee..088e239d955 100644
--- a/htdocs/langs/en_US/orders.lang
+++ b/htdocs/langs/en_US/orders.lang
@@ -79,7 +79,9 @@ NoOpenedOrders=No opened orders
NoOtherOpenedOrders=No other opened orders
NoDraftOrders=No draft orders
OtherOrders=Other orders
-LastOrders=Last %s orders
+LastOrders=Last %s customer orders
+LastCustomerOrders=Last %s customer orders
+LastSupplierOrders=Last %s supplier orders
LastModifiedOrders=Last %s modified orders
LastClosedOrders=Last %s closed orders
AllOrders=All orders
diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang
index 45263681965..8508a26e96d 100644
--- a/htdocs/langs/en_US/productbatch.lang
+++ b/htdocs/langs/en_US/productbatch.lang
@@ -7,6 +7,7 @@ ProductStatusNotOnBatchShort=No
Batch=Batch/Serial
atleast1batchfield=Eat-by date or Sell-by date or Batch number
batch_number=Batch/Serial number
+BatchNumberShort=Batch/Serial
l_eatby=Eat-by date
l_sellby=Sell-by date
DetailBatchNumber=Batch/Serial details
diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index 40b1c2e308d..e56ddf2ec4a 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -14,6 +14,7 @@ MyTasksDesc=This view is limited to projects or tasks you are a contact for (wha
OnlyOpenedProject=Only opened projects are visible (projects with draft or closed status are not visible).
TasksPublicDesc=This view presents all projects and tasks you are allowed to read.
TasksDesc=This view presents all projects and tasks (your user permissions grant you permission to view everything).
+AllTaskVisibleButEditIfYouAreAssigned=All tasks for such project are visible, but you can enter time only for task you are assigned on.
ProjectsArea=Projects area
NewProject=New project
AddProject=Create project
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index 9019240490b..998168decdd 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -132,3 +132,4 @@ ShowWarehouse=Show warehouse
MovementCorrectStock=Stock content correction for product %s
MovementTransferStock=Stock transfer of product %s into another warehouse
WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when batch module is on. It will be used to list wich lot/serial is available for product that required lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps.
+InventoryCodeShort=Inv./Mov. code
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index fd7e4b40acd..a890d2ea7f3 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -1606,7 +1606,7 @@ SalariesSetup=Configuration du module salariés
SortOrder=Ordre de tri
Format=Format
TypePaymentDesc=0:Type de paiement client, 1:Type de paiement fournisseur, 2:Paiement de type client et fournisseur
-IncludePath=Chemin Include (définir dans la variable %s)
+IncludePath=Chemin Include (défini dans la variable %s)
ExpenseReportsSetup=Configuration du module Notes de frais
TemplatePDFExpenseReports=Modèles de documents pour générer les document de Notes de frais
NoModueToManageStockDecrease=Aucun module capable d'assurer la réduction de stock en automatique a été activé. La réduction de stock se fera donc uniquement sur mise à jour manuelle.
diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang
index 9e79b16af11..a6a4c1a85a4 100644
--- a/htdocs/langs/fr_FR/bills.lang
+++ b/htdocs/langs/fr_FR/bills.lang
@@ -190,7 +190,7 @@ AlreadyPaid=Déjà réglé
AlreadyPaidBack=Déjà remboursé
AlreadyPaidNoCreditNotesNoDeposits=Déjà réglé (hors avoirs et acomptes)
Abandoned=Abandonné
-RemainderToPay=Restant impayé
+RemainderToPay=Reste à payer
RemainderToTake=Montant restant à percevoir
RemainderToPayBack=Montant à rembourser
Rest=Créance
@@ -294,8 +294,8 @@ TotalOfTwoDiscountMustEqualsOriginal=La somme du montant des 2 nouvelles réduct
ConfirmRemoveDiscount=Êtes-vous sûr de vouloir supprimer cette réduction ?
RelatedBill=Facture associée
RelatedBills=Factures associées
-RelatedCustomerInvoices=Related customer invoices
-RelatedSupplierInvoices=Related supplier invoices
+RelatedCustomerInvoices=Factures clients liées
+RelatedSupplierInvoices=Factures fournisseurs liées
LatestRelatedBill=Dernière facture en rapport
WarningBillExist=Attention, une ou plusieurs factures existent déjà
diff --git a/htdocs/langs/fr_FR/categories.lang b/htdocs/langs/fr_FR/categories.lang
index 5a6ac7abc31..c310342feff 100644
--- a/htdocs/langs/fr_FR/categories.lang
+++ b/htdocs/langs/fr_FR/categories.lang
@@ -1,9 +1,9 @@
# Dolibarr language file - Source file is en_US - categories
-Rubrique=Tag/Category
-Rubriques=Tags/Categories
-categories=tags/categories
-TheCategorie=The tag/category
-NoCategoryYet=No tag/category of this type created
+Rubrique=Label/Catégorie
+Rubriques=Labels/Catégories
+categories=labels/catégories
+TheCategorie=Le label/Catégorie
+NoCategoryYet=Aucun label/catégorie de ce type n'a été créé
In=Dans
AddIn=Ajouter dans
modify=modifier
@@ -18,8 +18,8 @@ ContactsCategoriesArea=Contacts tags/categories area
MainCats=Main tags/categories
SubCats=Sous-catégories
CatStatistics=Statistiques
-CatList=List of tags/categories
-AllCats=All tags/categories
+CatList=Liste des labels/catégories
+AllCats=Tous les labels/catégories
ViewCat=View tag/category
NewCat=Add tag/category
NewCategory=New tag/category
diff --git a/htdocs/langs/fr_FR/cron.lang b/htdocs/langs/fr_FR/cron.lang
index 7c67426510d..b009c0b54d6 100644
--- a/htdocs/langs/fr_FR/cron.lang
+++ b/htdocs/langs/fr_FR/cron.lang
@@ -18,7 +18,7 @@ CronExplainHowToRunUnix=Sur un environnement Unix vous pouvez utiliser l'entrée
CronExplainHowToRunWin=Sur un environement Microsoft(tm) Windows vous pouvez utiliser le planificateur de tache pour lancer cette commande toute les 5 minutes.
# Menu
CronJobs=Travaux programmés
-CronListActive=Liste des travaux actifs/programmés
+CronListActive=Liste des travaux
CronListInactive=Liste des travaux inactifs
# Page list
CronDateLastRun=Dernier lancement
diff --git a/htdocs/langs/fr_FR/donations.lang b/htdocs/langs/fr_FR/donations.lang
index a2625c9c0fa..3dbb4cc5f76 100644
--- a/htdocs/langs/fr_FR/donations.lang
+++ b/htdocs/langs/fr_FR/donations.lang
@@ -6,8 +6,8 @@ Donor=Donateur
Donors=Donateurs
AddDonation=Créer un don
NewDonation=Nouveau don
-DeleteADonation=Delete a donation
-ConfirmDeleteADonation=Are you sure you want to delete this donation ?
+DeleteADonation=Effacer le don
+ConfirmDeleteADonation=Êtes-vous sûr de vouloir supprimer ce don ?
ShowDonation=Montrer don
DonationPromise=Promesse de don
PromisesNotValid=Promesses non validées
@@ -23,8 +23,8 @@ DonationStatusPaid=Don payé
DonationStatusPromiseNotValidatedShort=Non validée
DonationStatusPromiseValidatedShort=Validée
DonationStatusPaidShort=Payé
-DonationTitle=Donation receipt
-DonationDatePayment=Payment date
+DonationTitle=Reçu de dons
+DonationDatePayment=Date paiement
ValidPromess=Valider promesse
DonationReceipt=Reçu de dons
BuildDonationReceipt=Créer reçu
@@ -40,4 +40,4 @@ FrenchOptions=Options propres à la france
DONATION_ART200=Afficher article 200 du CGI si vous êtes concernés
DONATION_ART238=Afficher article 238 du CGI si vous êtes concernés
DONATION_ART885=Afficher article 885 du CGI si vous êtes concernés
-DonationPayment=Donation payment
+DonationPayment=Paiement du don
diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang
index d784017964d..dd92729aa4d 100644
--- a/htdocs/langs/fr_FR/errors.lang
+++ b/htdocs/langs/fr_FR/errors.lang
@@ -25,7 +25,7 @@ ErrorFromToAccountsMustDiffers=Les comptes source et destination doivent être d
ErrorBadThirdPartyName=Nom de tiers incorrect
ErrorProdIdIsMandatory=Le %s est obligatoire
ErrorBadCustomerCodeSyntax=La syntaxe du code client est incorrecte
-ErrorBadBarCodeSyntax=Bad syntax for bar code. May be you set a bad barcode type or you defined a barcode mask for numbering that does not match value scanned.
+ErrorBadBarCodeSyntax=Mauvaise syntaxe pour le code barre. Peut être que vous avez défini un mauvais type de code-barres ou que vous avez défini un masque de code à barres pour la numérotation qui ne correspond pas à la valeur scannée.
ErrorCustomerCodeRequired=Code client obligatoire
ErrorBarCodeRequired=Code-barre requis
ErrorCustomerCodeAlreadyUsed=Code client déjà utilisé
@@ -160,13 +160,13 @@ ErrorPriceExpressionInternal=Erreur interne '%s'
ErrorPriceExpressionUnknown=Erreur inconnue '%s'
ErrorSrcAndTargetWarehouseMustDiffers=Les entrepôts source et destination doivent être différents
ErrorTryToMakeMoveOnProductRequiringBatchData=Erreur, vous essayez de faire un mouvement sans lot/numéro de série, sur un produit qui exige un lot/numéro de série.
-ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=All recorded receptions must first be verified before being allowed to do this action
-ErrorGlobalVariableUpdater0=HTTP request failed with error '%s'
-ErrorGlobalVariableUpdater1=Invalid JSON format '%s'
-ErrorGlobalVariableUpdater2=Missing parameter '%s'
-ErrorGlobalVariableUpdater3=The requested data was not found in result
-ErrorGlobalVariableUpdater4=SOAP client failed with error '%s'
-ErrorGlobalVariableUpdater5=No global variable selected
+ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=Toutes les réceptions enregistrées doivent d'abord être vérifiées avant d'être autorisés à faire cette action
+ErrorGlobalVariableUpdater0=La requête HTTP a échoué avec l'erreur '%s'
+ErrorGlobalVariableUpdater1=Format JSON invalide '%s'
+ErrorGlobalVariableUpdater2=Paramètre manquant '%s'
+ErrorGlobalVariableUpdater3=La donnée recherché n'a pas été trouvée
+ErrorGlobalVariableUpdater4=Le client SOAP a échoué avec l'erreur '%s'
+ErrorGlobalVariableUpdater5=Pas de variable globale
# Warnings
WarningMandatorySetupNotComplete=Les informations de configuration obligatoire doivent être renseignées
diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang
index 0883a410e7d..b1fe2e89036 100644
--- a/htdocs/langs/fr_FR/main.lang
+++ b/htdocs/langs/fr_FR/main.lang
@@ -141,7 +141,7 @@ Cancel=Annuler
Modify=Modifier
Edit=Éditer
Validate=Valider
-ValidateAndApprove=Validate and Approve
+ValidateAndApprove=Valider et Approuver
ToValidate=À valider
Save=Enregistrer
SaveAs=Enregistrer sous
@@ -159,7 +159,7 @@ Search=Rechercher
SearchOf=Recherche de
Valid=Valider
Approve=Approuver
-Disapprove=Disapprove
+Disapprove=Désapprouver
ReOpen=Réouvrir
Upload=Envoyer fichier
ToLink=Lier
@@ -221,7 +221,7 @@ Cards=Fiches
Card=Fiche
Now=Maintenant
Date=Date
-DateAndHour=Date and hour
+DateAndHour=Date et heure
DateStart=Date début
DateEnd=Date fin
DateCreation=Date création
@@ -395,8 +395,8 @@ Available=Disponible
NotYetAvailable=Pas encore disponible
NotAvailable=Non disponible
Popularity=Popularité
-Categories=Tags/categories
-Category=Tag/category
+Categories=Tags/catégories
+Category=Tag/catégorie
By=Par
From=Du
to=au
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 397f06ce156..c3f8cf5994d 100755
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -3689,7 +3689,7 @@ class Product extends CommonObject
*/
function isproduct()
{
- return ($this->type != Product::TYPE_PRODUCT ? true : false);
+ return ($this->type == Product::TYPE_PRODUCT ? true : false);
}
/**
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index f35e6628ad6..9d7a9215ef1 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -43,6 +43,7 @@ $id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$rowid=GETPOST('rowid','int');
$action=GETPOST('action', 'alpha');
+$cancel=GETPOST('cancel', 'alpha');
$socid=GETPOST('socid', 'int');
$backtopage=GETPOST('backtopage','alpha');
$error=0;
@@ -77,6 +78,8 @@ if (! $sortorder) $sortorder="ASC";
* Actions
*/
+if ($cancel) $action='';
+
$parameters=array('socid'=>$socid, 'id_prod'=>$id);
$reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@@ -97,59 +100,70 @@ if (empty($reshook))
}
}
-if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
-{
- $id_fourn=GETPOST("id_fourn");
- if (empty($id_fourn)) $id_fourn=GETPOST("search_id_fourn");
- $ref_fourn=GETPOST("ref_fourn");
- if (empty($ref_fourn)) $ref_fourn=GETPOST("search_ref_fourn");
- $quantity=GETPOST("qty");
- $remise_percent=price2num(GETPOST('remise_percent','alpha'));
- $npr = preg_match('/\*/', $_POST['tva_tx']) ? 1 : 0 ;
- $tva_tx = str_replace('*','', GETPOST('tva_tx','alpha'));
- $tva_tx = price2num($tva_tx);
- $price_expression = GETPOST('eid', 'int') ? GETPOST('eid', 'int') : ''; // Discard expression if not in expression mode
- $delivery_time_days = GETPOST('delivery_time_days', 'int') ? GETPOST('delivery_time_days', 'int') : '';
+ if ($action == 'updateprice')
+ {
+ $id_fourn=GETPOST("id_fourn");
+ if (empty($id_fourn)) $id_fourn=GETPOST("search_id_fourn");
+ $ref_fourn=GETPOST("ref_fourn");
+ if (empty($ref_fourn)) $ref_fourn=GETPOST("search_ref_fourn");
+ $quantity=GETPOST("qty");
+ $remise_percent=price2num(GETPOST('remise_percent','alpha'));
+ $npr = preg_match('/\*/', $_POST['tva_tx']) ? 1 : 0 ;
+ $tva_tx = str_replace('*','', GETPOST('tva_tx','alpha'));
+ $tva_tx = price2num($tva_tx);
+ $price_expression = GETPOST('eid', 'int') ? GETPOST('eid', 'int') : ''; // Discard expression if not in expression mode
+ $delivery_time_days = GETPOST('delivery_time_days', 'int') ? GETPOST('delivery_time_days', 'int') : '';
- if ($tva_tx == '')
- {
- $error++;
- setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("VATRateForSupplierProduct")), 'errors');
- }
- if (empty($quantity))
- {
- $error++;
- setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Qty")), 'errors');
- }
- if (empty($ref_fourn))
- {
- $error++;
- setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("RefSupplier")), 'errors');
- }
- if ($id_fourn <= 0)
- {
- $error++;
- setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Supplier")), 'errors');
- }
- if ($_POST["price"] < 0 || $_POST["price"] == '')
- {
- if ($price_expression === '') // Return error of missing price only if price_expression not set
+ if ($tva_tx == '')
{
$error++;
- setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Price")), 'errors');
+ $langs->load("errors");
+ setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("VATRateForSupplierProduct")), 'errors');
}
- else
+ if (! is_numeric($tva_tx))
{
- $_POST["price"] = 0;
+ $error++;
+ $langs->load("errors");
+ setEventMessage($langs->trans("ErrorFieldMustBeANumeric",'eeee'), 'errors');
+ }
+ if (empty($quantity))
+ {
+ $error++;
+ $langs->load("errors");
+ setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Qty")), 'errors');
+ }
+ if (empty($ref_fourn))
+ {
+ $error++;
+ $langs->load("errors");
+ setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("RefSupplier")), 'errors');
+ }
+ if ($id_fourn <= 0)
+ {
+ $error++;
+ $langs->load("errors");
+ setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Supplier")), 'errors');
+ }
+ if ($_POST["price"] < 0 || $_POST["price"] == '')
+ {
+ if ($price_expression === '') // Return error of missing price only if price_expression not set
+ {
+ $error++;
+ $langs->load("errors");
+ setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Price")), 'errors');
+ }
+ else
+ {
+ $_POST["price"] = 0;
+ }
}
- }
$product = new ProductFournisseur($db);
$result=$product->fetch($id);
if ($result <= 0)
{
$error++;
- setEventMessage($product->error, 'errors');
+ setEventMessages($product->error, $product->errors, 'errors');
}
if (! $error)
@@ -187,7 +201,7 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
{
$error++;
- setEventMessage($product->error, 'errors');
+ setEventMessage($product->error, $product->errors, 'errors');
}
else
{
@@ -222,13 +236,10 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
$db->rollback();
}
}
- }
-
- if (GETPOST('cancel') == $langs->trans("Cancel"))
- {
- $action = '';
- header("Location: fournisseurs.php?id=".$_GET["id"]);
- exit;
+ else
+ {
+ $action = 'add_price';
+ }
}
}
@@ -253,10 +264,6 @@ if ($id || $ref)
{
if ($action <> 'edit' && $action <> 're-edit')
{
- /*
- * En mode visu
- */
-
$head=product_prepare_head($product);
$titre=$langs->trans("CardProduct".$product->type);
$picto=($product->type== Product::TYPE_SERVICE?'service':'product');
@@ -325,6 +332,8 @@ if ($id || $ref)
print '';
print '';
print '';
+ print '';
+ print '';
}
else
{
@@ -487,11 +496,7 @@ if ($id || $ref)
print '';
}
- /* ************************************************************************** */
- /* */
- /* Barre d'action */
- /* */
- /* ************************************************************************** */
+ // Actions buttons
print "\n
';
}
print_liste_field_titre($langs->trans("Warehouse"),$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
- print_liste_field_titre($langs->trans("InventoryCode"),$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("InventoryCodeShort"),$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("LabelMovement"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Source"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Units"),$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index b5639228325..39a81abe86d 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -821,8 +821,9 @@ if (empty($action) && $product->id)
/*
- * Stock detail
+ * Stock detail (by warehouse). Do not go down into batch.
*/
+
print '
';
if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price,'MU'),1);
@@ -880,13 +881,13 @@ if ($resql)
print '
';
// Value sell
print '
';
- if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price*$obj->reel,'MT'),1).'
'; // Ditto : Show PMP from movement or from product
+ if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price*$obj->reel,'MT'),1).'';
else print $langs->trans("Variable");
print '