diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 8e963e799e9..613ed43f77d 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -83,7 +83,7 @@ if ($_POST['action'] == 'setmode')
$facture = new Facture($db);
$facture->fetch($_GET['facid']);
$result=$facture->mode_reglement($_POST['mode_reglement_id']);
- if ($result < 0) dolibarr_print_error($db,$facture->error);
+ if ($result < 0) dolibarr_print_error($facture->db,$facture->error);
}
if ($_POST['action'] == 'setconditions')
@@ -91,7 +91,7 @@ if ($_POST['action'] == 'setconditions')
$facture = new Facture($db);
$facture->fetch($_GET['facid']);
$result=$facture->cond_reglement($_POST['cond_reglement_id']);
- if ($result < 0) dolibarr_print_error($db,$facture->error);
+ if ($result < 0) dolibarr_print_error($facture->db,$facture->error);
}
if ($_POST['action'] == 'classin')
@@ -204,7 +204,7 @@ if ($_POST['action'] == 'add')
}
else
{
- dolibarr_print_error($db,$facture->error);
+ dolibarr_print_error($facture->db,$facture->error);
}
}
@@ -241,7 +241,7 @@ if ($_POST['action'] == 'add')
}
else
{
- dolibarr_print_error($db,$facture->error);
+ dolibarr_print_error($facture->db,$facture->error);
}
}
@@ -289,7 +289,7 @@ if ($_POST['action'] == 'add')
}
else
{
- dolibarr_print_error($db,$facture->error);
+ dolibarr_print_error($facture->db,$facture->error);
}
}
@@ -1166,7 +1166,7 @@ else
$head = facture_prepare_head($fac);
- dolibarr_fiche_head($head, 0, $langs->trans('Bill').' : '.$fac->ref);
+ dolibarr_fiche_head($head, 0, $langs->trans('InvoiceCustomer'));
/*
* Confirmation de la suppression de la facture
@@ -1260,41 +1260,22 @@ else
}
print '';
- // Projet
- print '
';
- if ($conf->projet->enabled)
+ // Remise globale
+ print '
| '.$langs->trans('GlobalDiscount').' | ';
+ if ($fac->brouillon == 1 && $user->rights->facture->creer)
{
- $langs->load('projects');
- print '';
-
- print '';
-
- print ' | ';
- if ($_GET['action'] == 'classer')
- {
- $html->form_project($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->fk_soc,$fac->projetid,'projetid');
- }
- else
- {
- $html->form_project($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->fk_soc,$fac->projetid,'none');
- }
- print ' | ';
+ print '';
}
else
{
- print ' | | ';
+ print ''.$fac->remise_percent.'% | ';
}
- $nbrows=7;
+ $nbrows=5;
if ($conf->global->FAC_USE_CUSTOMER_ORDER_REF) $nbrows++;
print '';
@@ -1351,23 +1332,6 @@ else
print ' |
';
- print '| '.$langs->trans('Author').' | '.$author->fullname.' |
';
-
- print '| '.$langs->trans('GlobalDiscount').' | ';
- if ($fac->brouillon == 1 && $user->rights->facture->creer)
- {
- print '';
- }
- else
- {
- print ''.$fac->remise_percent.'% | ';
- }
- print '
';
-
/*
\todo
L'info "Reference commande client" est une carac de la commande et non de la facture.
@@ -1404,18 +1368,37 @@ else
// Statut
print '| '.$langs->trans('Status').' | '.($fac->getLibStatut()).' |
';
- /*
- if ($fac->note_public)
+ // Projet
+ if ($conf->projet->enabled)
{
- print '| '.$langs->trans('NotePublic').' | ';
- print ''.nl2br(dolibarr_trunc($fac->note_public,40)).' |
';
+ print '';
+ $langs->load('projects');
+ print '| ';
+
+ print '';
+
+ print ' | ';
+ if ($_GET['action'] == 'classer')
+ {
+ $html->form_project($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->fk_soc,$fac->projetid,'projetid');
+ }
+ else
+ {
+ $html->form_project($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->fk_soc,$fac->projetid,'none');
+ }
+ print ' | ';
+ print '
';
}
- else
- {
- print '| |
';
- }
- */
-
+
print '
';
/*
diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php
index ffdcbcf3fc9..4654bc69371 100644
--- a/htdocs/compta/facture/apercu.php
+++ b/htdocs/compta/facture/apercu.php
@@ -75,7 +75,7 @@ if ($_GET["facid"] > 0)
$head = facture_prepare_head($fac);
$hselected = $conf->use_preview_tabs ? 2 : false;
- dolibarr_fiche_head($head, $hselected, $langs->trans("Bill")." : $fac->ref");
+ dolibarr_fiche_head($head, $hselected, $langs->trans("InvoiceCustomer"));
/*
@@ -84,7 +84,10 @@ if ($_GET["facid"] > 0)
print '';
$rowspan=3;
- // Societe
+ // Reference
+ print '| '.$langs->trans('Ref').' | '.$fac->ref.' |
';
+
+ // Societe
print '| '.$langs->trans("Company").' | ';
print '';
print ''.$soc->nom.' | ';
@@ -105,31 +108,24 @@ if ($_GET["facid"] > 0)
$html->form_modes_reglement($_SERVER["PHP_SELF"]."?facid=$fac->id",$fac->mode_reglement_id,"none");
print '
';
- print '';
- if ($conf->projet->enabled)
- {
- $langs->load("projects");
- print '| '.$langs->trans("Project").' | ';
- if ($fac->projetid > 0)
- {
- $projet = New Project($db);
- $projet->fetch($fac->projetid);
- print ''.$projet->title.'';
- }
- else
- {
- print ' ';
- }
- }
- else
- {
- print ' | | ';
- }
- print ' | ';
-
- // partie Droite sur $rowspan lignes
- print '';
+ // Remise globale
+ print ' |
| '.$langs->trans('GlobalDiscount').' | ';
+ if ($fac->brouillon == 1 && $user->rights->facture->creer)
+ {
+ print '';
+ }
+ else
+ {
+ print ''.$fac->remise_percent.'% | ';
+ }
+ $nbrows=5;
+ if ($conf->global->FAC_USE_CUSTOMER_ORDER_REF) $nbrows++;
+ print '';
/*
* Documents
@@ -214,15 +210,37 @@ if ($_GET["facid"] > 0)
}
print " |
";
-
- print '| '.$langs->trans("GlobalDiscount").' | ';
- print ''.$fac->remise_percent.' | ';
- print '% |
';
-
print '| '.$langs->trans("AmountHT").' | ';
print ''.price($fac->total_ht).' | ';
print ''.$langs->trans("Currency".$conf->monnaie).' |
';
+ print '| '.$langs->trans('AmountVAT').' | '.price($fac->total_tva).' | ';
+ print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
+ print '| '.$langs->trans('AmountTTC').' | '.price($fac->total_ttc).' | ';
+ print ''.$langs->trans('Currency'.$conf->monnaie).' |
';
+
+ // Statut
+ print '| '.$langs->trans('Status').' | '.($fac->getLibStatut()).' |
';
+
+ // Projet
+ if ($conf->projet->enabled)
+ {
+ print '';
+ $langs->load("projects");
+ print '| '.$langs->trans("Project").' | ';
+ if ($fac->projetid > 0)
+ {
+ $projet = New Project($db);
+ $projet->fetch($fac->projetid);
+ print ''.$projet->title.'';
+ }
+ else
+ {
+ print ' ';
+ }
+ print ' |
';
+ }
+
print '
';
}
diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php
index 8c91ca25a8f..a5b7d9f36ab 100644
--- a/htdocs/compta/facture/contact.php
+++ b/htdocs/compta/facture/contact.php
@@ -225,7 +225,7 @@ if ($id > 0)
$head = facture_prepare_head($facture);
- dolibarr_fiche_head($head, 1, $langs->trans('Bill').' : '.$facture->ref);
+ dolibarr_fiche_head($head, 1, $langs->trans('InvoiceCustomer'));
/*
* Facture synthese pour rappel
@@ -241,7 +241,7 @@ if ($id > 0)
if ( is_null($facture->client) )
$facture->fetch_client();
- print "| ".$langs->trans("Customer")." | ";
+ print "
| ".$langs->trans("Company")." | ";
print '';
print ''.$facture->client->nom.' |
';
print "";
diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php
index 5f371bcff5c..4fa7c50dcc9 100644
--- a/htdocs/compta/facture/info.php
+++ b/htdocs/compta/facture/info.php
@@ -49,7 +49,7 @@ $head = facture_prepare_head($fac);
$hselected = 3;
if ($conf->use_preview_tabs) $hselected++;
if ($fac->mode_reglement_code == 'PRE') $hselected++;
-dolibarr_fiche_head($head, $hselected, $langs->trans("Bill")." : $fac->ref");
+dolibarr_fiche_head($head, $hselected, $langs->trans("InvoiceCustomer"));
print '| ';
diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php
index 1a2440feb52..f5499c99d01 100644
--- a/htdocs/compta/facture/note.php
+++ b/htdocs/compta/facture/note.php
@@ -107,7 +107,7 @@ if ($_GET["facid"])
if ($conf->use_preview_tabs) $hselected++;
if ($fac->mode_reglement_code == 'PRE') $hselected++;
- dolibarr_fiche_head($head, $hselected, $langs->trans("Bill")." : $fac->ref");
+ dolibarr_fiche_head($head, $hselected, $langs->trans("InvoiceCustomer"));
print ' |