diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 04157334410..ed39096c199 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2006 Andre Cianfarani @@ -505,7 +505,7 @@ if ($_REQUEST['action'] == 'confirm_converttoreduc' && $_REQUEST['confirm'] == ' */ if ($_POST['action'] == 'add' && $user->rights->facture->creer) { - $object->socid=$_POST['socid']; + $object->socid=GETPOST('socid'); $db->begin(); @@ -681,7 +681,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; } if ($element == 'contract') { $element = $subelement = 'contrat'; } - $object->origin = $_POST['origin']; + $object->origin = $_POST['origin']; $object->origin_id = $_POST['originid']; $facid = $object->create($user); @@ -777,7 +777,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) } } - // Fin creation facture, on l'affiche + // End of object creation, we show it if ($facid > 0 && ! $error) { $db->commit(); @@ -1438,7 +1438,7 @@ if ($_GET['action'] == 'create') '; } - print '
'; + print ''; print ''; print ''; print '' ."\n"; @@ -1449,7 +1449,7 @@ if ($_GET['action'] == 'create') print ''; // Ref - print ''; + print ''; // Factures predefinies if (empty($_GET['propalid']) && empty($_GET['commandeid']) && empty($_GET['contratid']) && empty($_GET['originid'])) @@ -1488,7 +1488,7 @@ if ($_GET['action'] == 'create') } // Tiers - print ''; @@ -1700,7 +1700,9 @@ if ($_GET['action'] == 'create') print ''; print ''; - print ''; + $newclassname=$classname; + if ($newclassname=='Propal') $newclassname='CommercialProposal'; + print ''; print ''; print '"; if ($mysoc->pays_code=='ES') @@ -1774,9 +1776,9 @@ if ($_GET['action'] == 'create') } } - // Bouton "Create Draft" print "
'.$langs->trans('Ref').''.$langs->trans('Draft').'
'.$langs->trans('Ref').''.$langs->trans('Draft').'
'.$langs->trans('Company').''; + print '
'.$langs->trans('Customer').''; print $soc->getNomUrl(1); print ''; print '
'.$langs->trans($classname).''.$objectsrc->getNomUrl(1).'
'.$langs->trans($newclassname).''.$objectsrc->getNomUrl(1).'
'.$langs->trans('TotalHT').''.price($objectsrc->total_ht).'
'.$langs->trans('TotalVAT').''.price($objectsrc->total_tva)."
\n"; + // Button "Create Draft" print '
'; print "
\n";