diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php
old mode 100644
new mode 100755
index 1bc0e2b6620..07e87dd86bb
--- a/build/generate_filelist_xml.php
+++ b/build/generate_filelist_xml.php
@@ -65,6 +65,8 @@ fputs($fp, ''."\n");
fputs($fp, ''."\n");
+$checksumconcat=array();
+
$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
$iterator1 = new RecursiveIteratorIterator($dir_iterator1);
// need to ignore document custom etc
@@ -81,12 +83,22 @@ foreach ($files as $file) {
$needtoclose=1;
}
if (filetype($file)=="file") {
- fputs($fp, ''.md5_file($file).''."\n");
+ $md5=md5_file($file);
+ $checksumconcat[]=$md5;
+ fputs($fp, ''.$md5.''."\n");
}
}
fputs($fp, ''."\n");
fputs($fp, ''."\n");
+asort($checksumconcat); // Sort list of checksum
+//var_dump($checksumconcat);
+fputs($fp, ''."\n");
+fputs($fp, md5(join(',',$checksumconcat))."\n");
+fputs($fp, ''."\n");
+
+
+$checksumconcat=array();
fputs($fp, ''."\n");
@@ -106,12 +118,18 @@ foreach ($files as $file) {
$needtoclose=1;
}
if (filetype($file)=="file") {
- fputs($fp, ''.md5_file($file).''."\n");
+ $md5=md5_file($file);
+ $checksumconcat[]=$md5;
+ fputs($fp, ''.$md5.''."\n");
}
}
fputs($fp, ''."\n");
fputs($fp, ''."\n");
+asort($checksumconcat); // Sort list of checksum
+fputs($fp, ''."\n");
+fputs($fp, md5(join(',',$checksumconcat))."\n");
+fputs($fp, ''."\n");
fputs($fp, ''."\n");
fclose($fp);
diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php
index 5bea1b521ac..1340b5ae3c1 100644
--- a/htdocs/admin/system/filecheck.php
+++ b/htdocs/admin/system/filecheck.php
@@ -75,9 +75,9 @@ $file_list = array('missing' => array(), 'updated' => array());
// File to analyze
//$xmlfile = DOL_DOCUMENT_ROOT.'/install/filelist-'.DOL_VERSION.'.xml';
-$xmlshortfile = '/install/filelist-'.DOL_VERSION.'.xml';
+$xmlshortfile = GETPOST('xmlshortfile')?GETPOST('xmlshortfile'):'/install/filelist-'.DOL_VERSION.'.xml';
$xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile;
-$xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml';
+$xmlremote = GETPOST('xmlremote')?GETPOST('xmlremote'):'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml';
// Test if remote test is ok
@@ -87,21 +87,27 @@ if (preg_match('/beta|alpha/i', DOL_VERSION)) $enableremotecheck=False;
print '
| '.$langs->trans('AmountVAT').' | '.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).' ';
if (GETPOST('calculationrule')) $calculationrule=GETPOST('calculationrule','alpha');
else $calculationrule=(empty($conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND)?'totalofround':'roundoftotal');
diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php
index 1da6e0699fc..9f54a9eceeb 100644
--- a/htdocs/fourn/facture/contact.php
+++ b/htdocs/fourn/facture/contact.php
@@ -134,32 +134,66 @@ if ($id > 0 || ! empty($ref))
{
$object->fetch_thirdparty();
+ $alreadypaid=$object->getSommePaiement();
+
$head = facturefourn_prepare_head($object);
dol_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), 0, 'bill');
- /*
- * Facture synthese pour rappel
- */
+ $linkback = ' ' . $langs->trans("BackToList") . '';
+
+ $morehtmlref=' ';
+ // Ref supplier
+ $morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
+ $morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1);
+ // Thirdparty
+ $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ // Project
+ if (! empty($conf->projet->enabled))
+ {
+ $langs->load("projects");
+ $morehtmlref.=' '.$langs->trans('Project') . ' ';
+ if ($user->rights->facture->creer)
+ {
+ if ($action != 'classify')
+ //$morehtmlref.=' ' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
+ $morehtmlref.=' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.=' ';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (! empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref.=' ';
+ $morehtmlref.=$proj->ref;
+ $morehtmlref.='';
+ } else {
+ $morehtmlref.='';
+ }
+ }
+ }
+ $morehtmlref.=' ';
+
+ $object->totalpaye = $alreadypaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status
+
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+ print ' ';
+ print ' ';
+
print ' ';
- $linkback = ''.$langs->trans("BackToList").'';
-
- // Reference du facture
- print '| '.$langs->trans("Ref").' | ';
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
- print " | ";
-
- // Ref supplier
- print '| '.$langs->trans("RefSupplier").' | '.$object->ref_supplier.' | ';
- print " \n";
-
- // Third party
- print "| ".$langs->trans("Supplier")." | ";
- print ''.$object->thirdparty->getNomUrl(1,'supplier').' | ';
-
// Type
- print '| '.$langs->trans('Type').' | ';
+ print ' | | '.$langs->trans('Type').' | ';
print $object->getLibType();
if ($object->type == FactureFournisseur::TYPE_REPLACEMENT)
{
@@ -198,33 +232,29 @@ if ($id > 0 || ! empty($ref))
print ' | ';
// Label
- print '| '.$form->editfieldkey("Label",'label',$object->label,$object,0).' | ';
+ print ' | | '.$form->editfieldkey("Label",'label',$object->label,$object,0).' | ';
print $form->editfieldval("Label",'label',$object->label,$object,0);
print ' | ';
- // Status
- $alreadypaid=$object->getSommePaiement();
- print '| '.$langs->trans('Status').' | '.$object->getLibStatut(4,$alreadypaid).' | ';
-
// Amount
- print '| '.$langs->trans('AmountHT').' | '.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).' | ';
- print '| '.$langs->trans('AmountVAT').' | '.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print '| '.$langs->trans('AmountHT').' | '.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print '| '.$langs->trans('AmountVAT').' | '.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).' | ';
// Amount Local Taxes
//TODO: Place into a function to control showing by country or study better option
if ($societe->localtax1_assuj=="1") //Localtax1
{
print '| '.$langs->transcountry("AmountLT1",$societe->country_code).' | ';
- print ''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print ''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).' | ';
print ' ';
}
if ($societe->localtax2_assuj=="1") //Localtax2
{
print '| '.$langs->transcountry("AmountLT2",$societe->country_code).' | ';
- print ''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print ''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).' | ';
print ' ';
}
- print '| '.$langs->trans('AmountTTC').' | '.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print '| '.$langs->trans('AmountTTC').' | '.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).' | ';
print " ";
diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php
index c9a40f9b590..5ffe26f07c7 100644
--- a/htdocs/fourn/facture/document.php
+++ b/htdocs/fourn/facture/document.php
@@ -4,6 +4,7 @@
* Copyright (C) 2005 Marc Barilley / Ocebo
* Copyright (C) 2005-2012 Regis Houssin
* Copyright (C) 2013 Cédric Salvador
+ * Copyright (C) 2016 Alexandre Spangaro
*
* 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
@@ -89,6 +90,58 @@ if ($object->id > 0)
{
$head = facturefourn_prepare_head($object);
dol_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), 0, 'bill');
+
+ $totalpaye = $object->getSommePaiement();
+
+ $linkback = '' . $langs->trans("BackToList") . '';
+
+ $morehtmlref='';
+ // Ref supplier
+ $morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
+ $morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1);
+ // Thirdparty
+ $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ // Project
+ if (! empty($conf->projet->enabled))
+ {
+ $langs->load("projects");
+ $morehtmlref.=' '.$langs->trans('Project') . ' ';
+ if ($user->rights->facture->creer)
+ {
+ if ($action != 'classify')
+ //$morehtmlref.=' ' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
+ $morehtmlref.=' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.=' ';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (! empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref.=' ';
+ $morehtmlref.=$proj->ref;
+ $morehtmlref.='';
+ } else {
+ $morehtmlref.='';
+ }
+ }
+ }
+ $morehtmlref.=' ';
+
+ $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status
+
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0);
+
+ print '';
+ print ' ';
// Construit liste des fichiers
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
@@ -109,23 +162,8 @@ if ($object->id > 0)
print ' ';
- $linkback = ''.$langs->trans("BackToList").'';
-
- // Ref
- print '| '.$langs->trans("Ref").' | ';
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
- print ' | ';
- print " \n";
-
- // Ref supplier
- print '| '.$langs->trans("RefSupplier").' | '.$object->ref_supplier.' | ';
- print " \n";
-
- // Thirdparty
- print '| '.$langs->trans('Supplier').' | '.$object->thirdparty->getNomUrl(1,'supplier').' | ';
-
// Type
- print '| '.$langs->trans('Type').' | ';
+ print ' | | '.$langs->trans('Type').' | ';
print $object->getLibType();
if ($object->type == FactureFournisseur::TYPE_REPLACEMENT)
{
@@ -166,42 +204,38 @@ if ($object->id > 0)
print ' | ';
// Label
- print '| '.$form->editfieldkey("Label",'label',$object->label,$object,0).' | ';
+ print ' | | '.$form->editfieldkey("Label",'label',$object->label,$object,0).' | ';
print $form->editfieldval("Label",'label',$object->label,$object,0);
print ' | ';
- // Status
- $alreadypaid=$object->getSommePaiement();
- print ' | '.$langs->trans('Status').' | '.$object->getLibStatut(4,$alreadypaid).' | ';
-
// Amount
- print '| '.$langs->trans('AmountHT').' | '.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).' | ';
- print '| '.$langs->trans('AmountVAT').' | '.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print '| '.$langs->trans('AmountHT').' | '.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print '| '.$langs->trans('AmountVAT').' | '.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).' | ';
// Amount Local Taxes
//TODO: Place into a function to control showing by country or study better option
if ($societe->localtax1_assuj=="1") //Localtax1
{
print '| '.$langs->transcountry("AmountLT1",$societe->country_code).' | ';
- print ''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print ''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).' | ';
print ' ';
}
if ($societe->localtax2_assuj=="1") //Localtax2
{
print '| '.$langs->transcountry("AmountLT2",$societe->country_code).' | ';
- print ''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print ''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).' | ';
print ' ';
}
- print '| '.$langs->trans('AmountTTC').' | '.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print '| '.$langs->trans('AmountTTC').' | '.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).' | ';
print ' ';
print ' ';
// Nb of files
- print '| '.$langs->trans('NbOfAttachedFiles').' | '.count($filearray).' | ';
+ print '| '.$langs->trans('NbOfAttachedFiles').' | '.count($filearray).' | ';
- print '| '.$langs->trans('TotalSizeOfAttachedFiles').' | '.$totalsize.' '.$langs->trans('bytes').' | ';
+ print '| '.$langs->trans('TotalSizeOfAttachedFiles').' | '.$totalsize.' '.$langs->trans('bytes').' | ';
print ' ';
print ' ';
diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php
index 590d5ea75bd..766eec3e724 100644
--- a/htdocs/fourn/facture/info.php
+++ b/htdocs/fourn/facture/info.php
@@ -2,6 +2,7 @@
/* Copyright (C) 2004 Rodolphe Quiedeville
* Copyright (C) 2004-2006 Laurent Destailleur
* Copyright (C) 2005-2009 Regis Houssin
+ * Copyright (C) 2016 Alexandre Spangaro
*
* 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
@@ -26,17 +27,19 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$langs->load('bills');
-$id = GETPOST("facid",'int');
+$id = GETPOST("facid",'int')?GETPOST("facid",'int'):GETPOST("id",'int');
+$ref = GETPOST("ref",'alpha');
// Security check
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
+$object = new FactureFournisseur($db);
/*
@@ -47,16 +50,69 @@ $title = $langs->trans('SupplierInvoice') . " - " . $langs->trans('Info');
$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores";
llxHeader('', $title, $helpurl);
-$object = new FactureFournisseur($db);
-$object->fetch($id);
-$object->info($id);
-$soc = new Societe($db);
-$soc->fetch($object->socid);
+$object->fetch($id, $ref);
+$object->fetch_thirdparty();
+
+$object->info($object->id);
+
+$alreadypaid=$object->getSommePaiement();
$head = facturefourn_prepare_head($object);
$titre=$langs->trans('SupplierInvoice');
dol_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), 0, 'bill');
+$linkback = '' . $langs->trans("BackToList") . '';
+
+$morehtmlref='';
+// Ref supplier
+$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
+$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1);
+// Thirdparty
+// $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+// Project
+if (! empty($conf->projet->enabled))
+{
+ $langs->load("projects");
+ $morehtmlref.=' '.$langs->trans('Project') . ' ';
+ if ($user->rights->facture->creer)
+ {
+ if ($action != 'classify')
+ //$morehtmlref.=' ' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
+ $morehtmlref.=' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.=' ';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (! empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref.=' ';
+ $morehtmlref.=$proj->ref;
+ $morehtmlref.='';
+ } else {
+ $morehtmlref.='';
+ }
+ }
+}
+$morehtmlref.=' ';
+
+$object->totalpaye = $alreadypaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status
+
+dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0);
+
+print '';
+print ' ';
+
+print ' ';
+
print ' | ';
dol_print_object_info($object);
print ' |
';
diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php
index eeb9d37f2fd..96945304869 100644
--- a/htdocs/fourn/facture/note.php
+++ b/htdocs/fourn/facture/note.php
@@ -75,6 +75,8 @@ if ($object->id > 0)
{
$object->fetch_thirdparty();
+ $alreadypaid=$object->getSommePaiement();
+
$head = facturefourn_prepare_head($object);
$titre=$langs->trans('SupplierInvoice');
dol_fiche_head($head, 'note', $titre, 0, 'bill');
@@ -82,23 +84,59 @@ if ($object->id > 0)
print ' ';
- $linkback = ''.$langs->trans("BackToList").'';
+ // Supplier invoice card
+ $linkback = ''.$langs->trans("BackToList").'';
- // Ref
- print '| '.$langs->trans("Ref").' | ';
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
- print ' | ';
- print " \n";
+ $morehtmlref='';
+ // Ref supplier
+ $morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
+ $morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1);
+ // Thirdparty
+ $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ // Project
+ if (! empty($conf->projet->enabled))
+ {
+ $langs->load("projects");
+ $morehtmlref.=' '.$langs->trans('Project') . ' ';
+ if ($user->rights->fournisseur->commande->creer)
+ {
+ if ($action != 'classify')
+ // $morehtmlref.=' ' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
+ $morehtmlref.=' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.=' ';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (! empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref.=' ';
+ $morehtmlref.=$proj->ref;
+ $morehtmlref.='';
+ } else {
+ $morehtmlref.='';
+ }
+ }
+ }
+ $morehtmlref.=' ';
- // Ref supplier
- print '| '.$langs->trans("RefSupplier").' | '.$object->ref_supplier.' | ';
- print " \n";
+ $object->totalpaye = $alreadypaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status
- // Company
- print '| '.$langs->trans('Supplier').' | '.$object->thirdparty->getNomUrl(1,'supplier').' | ';
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+ print '';
+ print ' ';
// Type
- print ' | '.$langs->trans('Type').' | ';
+ print ' | | '.$langs->trans('Type').' | ';
print $object->getLibType();
if ($object->type == FactureFournisseur::TYPE_REPLACEMENT)
{
@@ -137,38 +175,35 @@ if ($object->id > 0)
print ' | ';
// Label
- print ' | '.$form->editfieldkey("Label",'label',$object->label,$object,0).' | ';
+ print ' | | '.$form->editfieldkey("Label",'label',$object->label,$object,0).' | ';
print $form->editfieldval("Label",'label',$object->label,$object,0);
print ' | ';
- // Status
- $alreadypaid=$object->getSommePaiement();
- print ' | '.$langs->trans('Status').' | '.$object->getLibStatut(4,$alreadypaid).' | ';
-
// Amount
- print ' | '.$langs->trans('AmountHT').' | '.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).' | ';
- print ' | '.$langs->trans('AmountVAT').' | '.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print ' | '.$langs->trans('AmountHT').' | '.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print ' | '.$langs->trans('AmountVAT').' | '.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).' | ';
// Amount Local Taxes
//TODO: Place into a function to control showing by country or study better option
if ($societe->localtax1_assuj=="1") //Localtax1
{
print ' | '.$langs->transcountry("AmountLT1",$societe->country_code).' | ';
- print ''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print ''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).' | ';
print ' ';
}
if ($societe->localtax2_assuj=="1") //Localtax2
{
print ' | '.$langs->transcountry("AmountLT2",$societe->country_code).' | ';
- print ''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print ''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).' | ';
print ' ';
}
- print ' | '.$langs->trans('AmountTTC').' | '.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).' | ';
+ print ' | '.$langs->trans('AmountTTC').' | '.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).' | ';
print " ";
print ' ';
+ $cssclass="titlefield";
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
dol_fiche_end();
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index c57ea45858a..4f029afd8d8 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -10,6 +10,9 @@ VersionUnknown=Unknown
VersionRecommanded=Recommended
FileCheck=Files integrity checker
FileCheckDesc=This tool allows you to check the integrity of files of your application, comparing each files with the official ones. You can use this tool to detect if some files were modified by a hacker for example.
+FileIntegrityIsStrictlyConformedWithReference=Files integrity is strictly conformed with the reference.
+FileIntegritySomeFilesWereRemovedOrModified=Files integrity check has failed. Some files were modified of removed.
+GlobalChecksum=Global checksum
MakeIntegrityAnalysisFrom=Make integrity analysis of application files from
LocalSignature=Embedded local signature (less reliable)
RemoteSignature=Remote distant signature (more reliable)
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index ed5ab21bd6c..706d92eda20 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -753,6 +753,7 @@ RemoveString=Remove string '%s'
SomeTranslationAreUncomplete=Some languages may be partially translated or may contains errors. If you detect some, you can fix language files registering to http://transifex.com/projects/p/dolibarr/.
DirectDownloadLink=Direct download link
Download=Download
+ActualizeCurrency=Update currency rate
# Week day
Monday=Monday
Tuesday=Tuesday
diff --git a/htdocs/loan/info.php b/htdocs/loan/info.php
index 55f2c2257bb..87bd25fbe3b 100644
--- a/htdocs/loan/info.php
+++ b/htdocs/loan/info.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2014-2016 Alexandre Spangaro
*
* 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
@@ -70,6 +70,8 @@ dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0,
print '';
print ' ';
+print ' ';
+
print ' | ';
dol_print_object_info($object);
print ' |
';
diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php
index 2675e3c95b0..a0ca6fc2206 100644
--- a/htdocs/margin/agentMargins.php
+++ b/htdocs/margin/agentMargins.php
@@ -168,7 +168,7 @@ if ($result)
$num = $db->num_rows($result);
print ' ';
- print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',0,0,'');
+ print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',$num,$num,'');
$i = 0;
print " ";
diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php
index 34463db14e2..ec30f23ee98 100644
--- a/htdocs/margin/customerMargins.php
+++ b/htdocs/margin/customerMargins.php
@@ -205,7 +205,7 @@ if ($result)
$num = $db->num_rows($result);
print ' ';
- print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',0,0,'');
+ print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',$num,$num,'');
$i = 0;
print "";
diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php
index 88570d1c1d4..eb2a2e6d2ee 100644
--- a/htdocs/margin/productMargins.php
+++ b/htdocs/margin/productMargins.php
@@ -201,7 +201,7 @@ if ($result)
$num = $db->num_rows($result);
print ' ';
- print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"&id=".$id,$sortfield,$sortorder,'',0,0,'');
+ print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"&id=".$id,$sortfield,$sortorder,'',$num,$num,'');
$moreforfilter='';
@@ -301,16 +301,10 @@ if ($result)
// affichage totaux marges
$var=!$var;
$totalMargin = $cumul_vente - $cumul_achat;
- /*if ($totalMargin < 0)
- {
- $marginRate = ($cumul_achat != 0)?-1*(100 * $totalMargin / $cumul_achat):'';
- $markRate = ($cumul_vente != 0)?-1*(100 * $totalMargin / $cumul_vente):'';
- }
- else
- {*/
- $marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):'';
- $markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):'';
- //}
+
+ $marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):'';
+ $markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):'';
+
print '';
if ($id > 0)
print '| ';
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index 216d08df637..6bcf98e96c1 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -58,6 +58,10 @@ $fieldid = isset($_GET["ref"])?'ref':'rowid';
$d_eatby=dol_mktime(0, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']);
$d_sellby=dol_mktime(0, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']);
$pdluoid=GETPOST('pdluoid','int');
+$batchnumber=GETPOST('batch_number','san_alpha');
+if (!empty($batchnumber)) {
+ $batchnumber=trim($batchnumber);
+}
// Security check
if ($user->societe_id) $socid=$user->societe_id;
@@ -203,7 +207,7 @@ if ($action == "correct_stock" && ! $cancel)
$object = new Product($db);
$result=$object->fetch($id);
- if ($object->hasbatch() && ! GETPOST("batch_number"))
+ if ($object->hasbatch() && ! $batchnumber)
{
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("batch_number")), null, 'errors');
$error++;
@@ -231,7 +235,7 @@ if ($action == "correct_stock" && ! $cancel)
$priceunit,
$d_eatby,
$d_sellby,
- GETPOST('batch_number'),
+ $batchnumber,
GETPOST('inventorycode')
); // We do not change value of stock for a correction
}
@@ -296,7 +300,7 @@ if ($action == "transfert_stock" && ! $cancel)
$object = new Product($db);
$result=$object->fetch($id);
- if ($object->hasbatch() && ! GETPOST("batch_number"))
+ if ($object->hasbatch() && ! $batchnumber)
{
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("batch_number")), null, 'errors');
$error++;
@@ -343,7 +347,7 @@ if ($action == "transfert_stock" && ! $cancel)
else
{
$srcwarehouseid=GETPOST('id_entrepot','int');
- $batch=GETPOST('batch_number');
+ $batch=$batchnumber;
$eatby=$d_eatby;
$sellby=$d_sellby;
}
@@ -448,14 +452,14 @@ if ($action == 'updateline' && GETPOST('save') == $langs->trans('Save'))
{
if ($pdluo->id)
{
- if ((! GETPOST("sellby")) && (! GETPOST("eatby")) && (! GETPOST("batch_number"))) {
+ if ((! GETPOST("sellby")) && (! GETPOST("eatby")) && (! $batchnumber)) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("atleast1batchfield")), null, 'errors');
}
else
{
$d_eatby=dol_mktime(0, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']);
$d_sellby=dol_mktime(0, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']);
- $pdluo->batch=GETPOST("batch_number",'san_alpha');
+ $pdluo->batch=$batchnumber;
$pdluo->eatby=$d_eatby;
$pdluo->sellby=$d_sellby;
$result=$pdluo->update($user);
diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php
index 8b6bf3c0288..0c37f999259 100644
--- a/htdocs/projet/info.php
+++ b/htdocs/projet/info.php
@@ -48,7 +48,6 @@ $search_agenda_label=GETPOST('search_agenda_label');
// Security check
$socid=0;
-$id = GETPOST("id",'int');
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'projet',$id,'');
@@ -80,11 +79,6 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$form = new Form($db);
$object = new Project($db);
-$title=$langs->trans("Project").' - '.$object->ref.' '.$object->name;
-if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->ref.' '.$object->name.' - '.$langs->trans("Info");
-$help_url="EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
-llxHeader("",$title,$help_url);
-
if ($id > 0 || ! empty($ref))
{
$object->fetch($id, $ref);
@@ -92,6 +86,11 @@ if ($id > 0 || ! empty($ref))
$object->info($object->id);
}
+$title=$langs->trans("Project").' - '.$object->ref.' '.$object->name;
+if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->ref.' '.$object->name.' - '.$langs->trans("Info");
+$help_url="EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
+llxHeader("",$title,$help_url);
+
$head = project_prepare_head($object);
dol_fiche_head($head, 'agenda', $langs->trans("Project"), 0, ($object->public?'projectpub':'project'));
@@ -162,6 +161,10 @@ print '';
if (!empty($object->id))
{
+ $param='&id='.$object->id;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+
print load_fiche_titre($langs->trans("ActionsOnProject"),'','');
// List of actions on element
diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php
index e88f94e4287..9ca7f1fcd2a 100644
--- a/htdocs/societe/note.php
+++ b/htdocs/societe/note.php
@@ -58,7 +58,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
$form = new Form($db);
$title=$langs->trans("ThirdParty").' - '.$langs->trans("Notes");
-if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Files");
+if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Notes");
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('',$title,$help_url);
| |