From 8e3ce6ee8182802ce8cc907a4da03bc64827e614 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 14 Mar 2006 21:31:59 +0000 Subject: [PATCH] Renomme titre facture en "facture client" et corrige quelques pb alignement tableau --- htdocs/compta/facture.php | 107 +++++++++++++----------------- htdocs/compta/facture/apercu.php | 80 +++++++++++++--------- htdocs/compta/facture/contact.php | 4 +- htdocs/compta/facture/info.php | 2 +- htdocs/compta/facture/note.php | 2 +- 5 files changed, 98 insertions(+), 97 deletions(-) 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 ''; - if ($_GET['action'] != 'classer') - { - print ''; - } - print '
'; - print $langs->trans('Project'); - print ''; - print img_edit($langs->trans('SetProject'),1); - 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 '
'; + print ''; + print '% '; + 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 '
'; - print ''; - print '% '; - print ''; - 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 ''; + if ($_GET['action'] != 'classer') + { + print ''; + } + print '
'; + print $langs->trans('Project'); + print ''; + print img_edit($langs->trans('SetProject'),1); + 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 ''; + + // Societe print ''; print ''; @@ -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 ''; - - // partie Droite sur $rowspan lignes - print ''; + if ($fac->brouillon == 1 && $user->rights->facture->creer) + { + print ''; + print ''; + print ''; + print ''; + } + else + { + print ''; + } + $nbrows=5; + if ($conf->global->FAC_USE_CUSTOMER_ORDER_REF) $nbrows++; + print '"; - - print ''; - print ''; - print ''; - print ''; print ''; print ''; + print ''; + print ''; + print ''; + print ''; + + // Statut + print ''; + + // Projet + if ($conf->projet->enabled) + { + print ''; + $langs->load("projects"); + print ''; + } + print '
'.$langs->trans('Ref').''.$fac->ref.'
'.$langs->trans("Company").''; print ''.$soc->nom.'
'.$langs->trans("Project").''; - if ($fac->projetid > 0) - { - $projet = New Project($db); - $projet->fetch($fac->projetid); - print ''.$projet->title.''; - } - else - { - print ' '; - } - } - else - { - print ' '; - } - print ''; + // Remise globale + print '
'.$langs->trans('GlobalDiscount').'
% '; + print ''.$fac->remise_percent.'%'; /* * Documents @@ -214,15 +210,37 @@ if ($_GET["facid"] > 0) } print "
'.$langs->trans("GlobalDiscount").''.$fac->remise_percent.'%
'.$langs->trans("AmountHT").''.price($fac->total_ht).''.$langs->trans("Currency".$conf->monnaie).'
'.$langs->trans('AmountVAT').''.price($fac->total_tva).''.$langs->trans('Currency'.$conf->monnaie).'
'.$langs->trans('AmountTTC').''.price($fac->total_ttc).''.$langs->trans('Currency'.$conf->monnaie).'
'.$langs->trans('Status').''.($fac->getLibStatut()).'
'.$langs->trans("Project").''; + if ($fac->projetid > 0) + { + $projet = New Project($db); + $projet->fetch($fac->projetid); + print ''.$projet->title.''; + } + else + { + 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 '';