diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/fiche.php index 3fe1b3662a8..c5fc368dccb 100644 --- a/htdocs/fourn/paiement/fiche.php +++ b/htdocs/fourn/paiement/fiche.php @@ -115,7 +115,7 @@ dolibarr_fiche_head($head, $hselected, $langs->trans('SupplierPayment')); if ($_GET['action'] == 'delete') { $html->form_confirm('fiche.php?id='.$paiement->id, 'Supprimer le paiement', 'Etes-vous sūr de vouloir supprimer ce paiement ?', 'confirm_delete'); - print '
'; + print '
'; } /* @@ -124,16 +124,16 @@ if ($_GET['action'] == 'delete') if ($_GET['action'] == 'valide') { $html->form_confirm('fiche.php?id='.$paiement->id, 'Valider le paiement', 'Etes-vous sūr de vouloir valider ce paiment, auncune modification n\'est possible une fois le paiement validé ?', 'confirm_valide'); - print '
'; + print '
'; } if (!empty($_POST['action']) && $_POST['action'] == 'update_num' && !empty($_POST['new_num'])) { $res = $paiement->update_num($_POST['new_num']); if ($res === 0) { - $mesg = $langs->trans('PaymentNumberUpdateSucceeded'); + $mesg = '
'.$langs->trans('PaymentNumberUpdateSucceeded').'
'; } else { - $mesg = $langs->trans('PaymentNumberUpdateFailed'); + $mesg = '
'.$langs->trans('PaymentNumberUpdateFailed').'
'; } } @@ -145,14 +145,12 @@ if (!empty($_POST['action']) && $_POST['action'] == 'update_date' && !empty($_PO $_POST['reyear']); $res = $paiement->update_date($datepaye); if ($res === 0) { - $mesg = $langs->trans('PaymentDateUpdateSucceeded'); + $mesg = '
'.$langs->trans('PaymentDateUpdateSucceeded').'
'; } else { - $mesg = $langs->trans('PaymentDateUpdateFailed'); + $mesg = '
'.$langs->trans('PaymentDateUpdateFailed').'
'; } } -if ($mesg) print $mesg.'
'; - print ''; @@ -176,60 +174,66 @@ if ($conf->banque->enabled) print ''; } } -//switch through edition options for date (only available when statut is -not 1- (=validated)) -if($paiement->statut == 0) -{ + + //switch through edition options for date (only available when statut is -not 1- (=validated)) if(empty($_GET['action']) or $_GET['action']!='edit_date') { - print ''; - print ''; - print ''; + print ''; + print ''; } else { - print ''; + print ''; print ''; print ''; - print ''; + print ''; } -} -else -{ - print ''; - print ''; -} -print ''; -//switch through edition options for number (only available when statut is -not 1- (=validated)) -if ($paiement->numero) -{ + + print ''; + + //switch through edition options for number (only available when statut is -not 1- (=validated)) if ($paiement->statut == 0) { if(empty($_GET['action']) or $_GET['action'] != 'edit_num') { - print ''; - print ''; - print ''; + print ''; + print ''; } else { - print ''; - print ''; + print ''; + print ''; print ''; - print ''; + print ''; + print ''; + print ''; } } else @@ -237,18 +241,12 @@ if ($paiement->numero) print ''; print ''; } -} -else -{ - print ''; - print ''; - print ''; -} print ''; print ''; print ''; print '
'.$langs->trans('Date').''.img_edit().''.dolibarr_print_date($paiement->date).'
'; + print ''; + if ($_GET['action'] != 'edit_date') print ''; + print '
'; + print $langs->trans('Date'); + print ''.img_edit($langs->trans('Modify')).'
'; + print '
'.dolibarr_print_date($paiement->date,'day').'
'.$langs->trans('Date').''; + print ''; if (!empty($_POST['remonth']) && !empty($_POST['reday']) && !empty($_POST['reyear'])) - $sel_date=mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $sel_date=dolibarr_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); else $sel_date=$paiement->date; $html->select_date($sel_date,'','','','',"addpaiement"); - print ''; + print ''; + print ''; print '
'.$langs->trans('Date').''.dolibarr_print_date($paiement->date).'
'.$langs->trans('Type').''.$paiement->type_libelle.'
'.$langs->trans('Type').''.$paiement->type_libelle.'
'.$langs->trans('Numero').''.img_edit().''.$paiement->numero.'
'; + print ''; + print ''; + print '
'; + print $langs->trans('Numero'); + print ''.img_edit($langs->trans('Modify')).'
'; + print '
'.$paiement->numero.'
'.$langs->trans('Date').'
'.$langs->trans('Numero').''; + print ''; if (!empty($_POST['new_num'])) $num = $this->db->escape($_POST['new_num']); else $num = $paiement->numero; print ''; - print ''; - print '
'.$langs->trans('Numero').''.$paiement->numero.'
'.$langs->trans('Numero').''.img_edit().'
'.$langs->trans('Amount').''.price($paiement->montant).' '.$langs->trans('Currency'.$conf->monnaie).'
'.$langs->trans('Status').''.$paiement->getLibStatut(4).'
'.$langs->trans('Note').''.nl2br($paiement->note).'
'; +if ($mesg) print '
'.$mesg.'
'; /** * Liste des factures @@ -265,7 +263,7 @@ if ($resql) $i = 0; $total = 0; - print '
'.$langs->trans("Invoices").'
'; + print ''.$langs->trans("Invoices").'
'; print ''; print ''; print '';
'.$langs->trans('Ref').'