diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 6ced019c076..551dacfcafc 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2898,7 +2898,7 @@ else if ($id > 0 || ! empty($ref))
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', 0, 1);
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
+ $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
// Project
if (! empty($conf->projet->enabled))
{
@@ -2943,73 +2943,6 @@ else if ($id > 0 || ! empty($ref))
print '
| ' . $langs->trans('Ref') . ' | '; - print ''; - $morehtmlright = ''; - $discount = new DiscountAbsolute($db); - $result = $discount->fetch(0, $object->id); - if ($result > 0) { - $morehtmlright = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')'; - } - if ($result < 0) { - dol_print_error('', $discount->error); - } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', '', '', 0, '', '', $morehtmlright); - print ' | |||||||||||||||||||||||||
';
- print '
| ';
- print ''; - if ($user->rights->facture->creer && $action == 'refclient') { - print ''; - } else { - print $object->ref_client; - } - print ' | |||||||||||||||||||||||||
';
- print '
| '; - if ($action == 'editthirdparty') { - $form->form_thirdparty($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, 'socid','client>0'); - } else { - print ' ' . $soc->getNomUrl(1, 'compta'); - print ' '; - print '(' . $langs->trans('OtherBills') . ''; - // Outstanding Bill - $outstandingBills = $soc->get_OutstandingBill(); - print ' - ' . $langs->trans('CurrentOutstandingBill') . ': '; - print price($outstandingBills, '', $langs, 0, 0, - 1, $conf->currency); - if ($soc->outstanding_limit != '') - { - if ($outstandingBills > $soc->outstanding_limit) - print img_warning($langs->trans("OutstandingBillReached")); - print ' / ' . price($soc->outstanding_limit); - } - print ')'; - } - print ' | |||||||||||||||||||||||||
| ' . $langs->trans('Type') . ' | '; print $object->getLibType(); @@ -3338,37 +3271,6 @@ else if ($id > 0 || ! empty($ref)) } } - // Statut - /* - print ' | |||||||||||||||||||||||||
| ' . $langs->trans('Status') . ' | '; - print '' . ($object->getLibStatut(4, $totalpaye)) . ' | |||||||||||||||||||||||||
';
-
- print '
| '; - if ($action == 'classify') { - $form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1); - } else { - $form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0); - } - print ' | '; - print '|||||||||||||||||||||||||
| '; //print $langs->trans('Ref'); print $form->editfieldkey($langs->trans("Ref"), 'ref', $object->ref, $object, $user->rights->facture->creer); @@ -1083,11 +1141,11 @@ else print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'none', $morehtmlref); print ' | |||
| '.$langs->trans("Customer").' | '; print ''.$object->thirdparty->getNomUrl(1,'customer').' | ||
| ".$langs->trans("Author").' | '.$author->getFullName($langs)." | ||
| '.$langs->trans("Author").' | '.$author->getFullName($langs)." | ||
| '.$langs->trans("AmountHT").' | '; print ''.price($object->total_ht,'',$langs,1,-1,-1,$conf->currency).' | '; @@ -1158,6 +1216,7 @@ else print '||
| '; @@ -1204,10 +1263,15 @@ else print " | "; print '|||
| '; + print ' | ||||||||||||||||||||||||||
';
print '
| '; + print ' | '; if ($action == 'editfrequency') { print ' | '; + print ' | '; if ($action == 'date_when' || $object->frequency > 0) { print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); @@ -1278,7 +1342,7 @@ else { print $langs->trans("MaxPeriodNumber"); } - print ' | '; + print ' | '; if ($action == 'nb_gen_max' || $object->frequency > 0) { print $form->editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer); @@ -1296,7 +1360,7 @@ else print $form->editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer); else print $langs->trans("StatusOfGeneratedInvoices"); - print ' | '; + print ' | '; $select = 'select;0:'.$langs->trans('BillStatusDraft').',1:'.$langs->trans('BillStatusValidated'); if ($action == 'auto_validate' || $object->frequency > 0) { @@ -1307,20 +1371,21 @@ else print ' | ||||||||||||||||||
| '.$langs->trans("NbOfGenerationDone").' | '; + print '||||||
| '.$langs->trans("NbOfGenerationDone").' | '; print ''; print $object->nb_gen_done?$object->nb_gen_done:'0'; print ' | '; @@ -1329,7 +1394,7 @@ else // Date last print '|||||
| '; print $langs->trans("DateLastGeneration"); - print ' | '; + print ' | '; print dol_print_date($object->date_last_gen, 'dayhour'); print ' | '; print '||||