From d67d83515a603b16d51d63d23c21d92a51766624 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Mar 2017 01:40:53 +0100 Subject: [PATCH] Fix dol_banner usage --- htdocs/compta/paiement/cheque/card.php | 43 +++++++------------ .../cheque/class/remisecheque.class.php | 10 ++++- 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index e351b68df76..3482492a530 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -560,7 +560,6 @@ if ($action == 'new') } else { - $linkback=''.$langs->trans("BackToList").''; $paymentstatic=new Paiement($db); $accountlinestatic=new AccountLine($db); $accountstatic=new Account($db); @@ -568,34 +567,20 @@ else $accountstatic->id=$object->account_id; $accountstatic->label=$object->account_label; + $linkback=''.$langs->trans("BackToList").''; + + $morehtmlref=''; + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + print '
'; + + print ''; + print ''; - print ''; - - print '
'; - print ''; - if ($action != 'editref') print ''; - print '
'; - print $langs->trans('Ref'); - print 'id.'">'.img_edit($langs->trans('SetRef'),1).'
'; - print '
'; - if ($action == 'editref') - { - print '
'; - print ''; - print ''; - print ''; - print ''; - print '
'; - } - else - { - print $form->showrefnav($object,'ref',$linkback, 1, 'ref'); - } - - print '
'; - print ''; @@ -660,13 +645,15 @@ else print price($object->amount); print ''; - print ''; + print '';*/ print '
'; print $langs->trans('Date'); print '
'.$langs->trans('Status').''; + /*print '
'.$langs->trans('Status').''; print $object->getLibStatut(4); - print '

'; + print ''; + // List of cheques $sql = "SELECT b.rowid, b.amount, b.num_chq, b.emetteur,"; $sql.= " b.dateo as date, b.datec as datec, b.banque,"; diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 998fd1db7c3..ad53e98693e 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -35,7 +35,8 @@ class RemiseCheque extends CommonObject { public $element='chequereceipt'; public $table_element='bordereau_cheque'; - + public $picto = 'payment'; + var $num; var $intitule; //! Numero d'erreur Plage 1024-1279 @@ -977,7 +978,7 @@ class RemiseCheque extends CommonObject * Return label of a status * * @param int $status Statut - * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @return string Libelle du statut */ function LibStatut($status,$mode=0) @@ -1014,6 +1015,11 @@ class RemiseCheque extends CommonObject if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut0'); if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); } + if ($mode == 6) + { + if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut0'); + if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); + } return $langs->trans('Unknown'); }