From 2a3ed3d0e98eff8957590a2bdb22a7a7ec63c4cf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 Feb 2010 17:18:56 +0000 Subject: [PATCH] Qual: A lot of screen more clear --- htdocs/compta/bank/account.php | 9 ++-- htdocs/compta/bank/search.php | 78 ++++++++++++++++++++++++++++++++- htdocs/fourn/paiement/fiche.php | 12 ++--- 3 files changed, 85 insertions(+), 14 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index cf41c8fdfd8..1a6908fb4b9 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -497,10 +497,7 @@ if ($account || $_GET["ref"]) // Description print ''; - - $links = $acct->get_url($objp->rowid); - - // Sgow generic description + // Show generic description if (preg_match('/^\((.*)\)$/i',$objp->label,$reg)) { // Generic description because between (). We show it after translating. @@ -510,8 +507,8 @@ if ($account || $_GET["ref"]) { print dol_trunc($objp->label,60); } - // Add links after description + $links = $acct->get_url($objp->rowid); foreach($links as $key=>$val) { if ($links[$key]['type']=='payment') { @@ -547,7 +544,7 @@ if ($account || $_GET["ref"]) print ' '.$paymentvatstatic->getNomUrl(2); } else if ($links[$key]['type']=='banktransfert') { - /* Do not show this link (avoid confusion). Can already be accessed from transaction detail */ + // Do not show this link (avoid confusion). Can already be accessed from transaction detail } else if ($links[$key]['type']=='member') { } diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 88ae567f2aa..87cda1f8588 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -188,14 +188,88 @@ if ($resql) print ''.dol_print_date($db->jdate($objp->do),"day")."   \n"; // Description - print "rowid&account=$objp->fk_account\">"; - //print $objp->label; + print ""; + + /* This bloc is same than in page compta/bank/account.php + + // Show generic description + if (preg_match('/^\((.*)\)$/i',$objp->label,$reg)) + { + // Generic description because between (). We show it after translating. + print $langs->trans($reg[1]); + } + else + { + print dol_trunc($objp->label,60); + } + // Add links after description + $links = $acct->get_url($objp->rowid); + foreach($links as $key=>$val) + { + if ($links[$key]['type']=='payment') { + $paymentstatic->id=$links[$key]['url_id']; + print ' '.$paymentstatic->getNomUrl(2); + } + else if ($links[$key]['type']=='payment_supplier') { + $paymentsupplierstatic->id=$links[$key]['url_id']; + $paymentsupplierstatic->ref=$links[$key]['url_id']; + print ' '.$paymentsupplierstatic->getNomUrl(2); + } + else if ($links[$key]['type']=='company') { + } + else if ($links[$key]['type']=='sc') { // This is waiting for card to link to payment_sc + $chargestatic->id=$links[$key]['url_id']; + $chargestatic->ref=$links[$key]['url_id']; + $chargestatic->lib=$langs->trans("SocialContribution"); + print ' '.$chargestatic->getNomUrl(2); + } + else if ($links[$key]['type']=='payment_sc') + { + //print ' - '; + print ''; + print ' '.img_object($langs->trans('ShowPayment'),'payment').' '; + //print $langs->trans("SocialContributionPayment"); + print ''; + + } + else if ($links[$key]['type']=='payment_vat') + { + $paymentvatstatic->id=$links[$key]['url_id']; + $paymentvatstatic->ref=$links[$key]['url_id']; + print ' '.$paymentvatstatic->getNomUrl(2); + } + else if ($links[$key]['type']=='banktransfert') { + // Do not show this link (avoid confusion). Can already be accessed from transaction detail + } + else if ($links[$key]['type']=='member') { + } + else { + //print ' - '; + print ''; + if (preg_match('/^\((.*)\)$/i',$links[$key]['label'],$reg)) + { + // Label generique car entre parentheses. On l'affiche en le traduisant + if ($reg[1]=='paiement') $reg[1]='Payment'; + print $langs->trans($reg[1]); + } + else + { + print $links[$key]['label']; + } + print ''; + } + } + */ + + print "rowid&account=$objp->fk_account\">"; $reg=array(); preg_match('/\((.+)\)/i',$objp->label,$reg); // Si texte entoure de parenthee on tente recherche de traduction if ($reg[1] && $langs->trans($reg[1])!=$reg[1]) print $langs->trans($reg[1]); else print dol_trunc($objp->label,40); print " "; + print ''; + // Third party print ""; if ($objp->url_id) diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/fiche.php index 7459dc7a345..c4a84e8e519 100644 --- a/htdocs/fourn/paiement/fiche.php +++ b/htdocs/fourn/paiement/fiche.php @@ -155,7 +155,7 @@ if (!empty($_POST['action']) && $_POST['action'] == 'update_date' && !empty($_PO print ''; print ''; -print ''; +print ''; //switch through edition options for date (only available when statut is -not 1- (=validated)) if (empty($_GET['action']) || $_GET['action']!='edit_date') @@ -172,7 +172,7 @@ if (empty($_GET['action']) || $_GET['action']!='edit_date') else { print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; } +print ''; + if ($conf->banque->enabled) { if ($paiement->bank_account) @@ -236,15 +238,13 @@ if ($conf->banque->enabled) $bankline->fetch($paiement->bank_line); print ''; - print ''; + print ''; print ''; print ''; print ''; } } -print ''; - print '
'.$langs->trans('Ref').''.$paiement->id.'
'.$langs->trans('Ref').''.$paiement->id.'
'.$langs->trans('Date').''.$langs->trans('Date').''; print '
'; print ''; @@ -204,7 +204,7 @@ if (empty($_GET['action']) || $_GET['action'] != 'edit_num') else { print '
'.$langs->trans('Numero').''.$langs->trans('Numero').''; print ''; print ''; @@ -224,6 +224,8 @@ if ($conf->global->BILL_ADD_PAYMENT_VALIDATION) print '
'.$langs->trans('Status').''.$paiement->getLibStatut(4).'
'.$langs->trans('Note').''.nl2br($paiement->note).'
'.$langs->trans('BankAccount').''.$langs->trans('BankAccount').''.img_object($langs->trans('ShowAccount'),'account').' '.$bank->label.''.$langs->trans('BankLineConciliated').''.yn($bankline->rappro).'
'.$langs->trans('Note').''.nl2br($paiement->note).'
'; if ($mesg) print '
'.$mesg;