From 216bce608d38fa3c88ab1341e714c08dc43ccf4c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Apr 2017 23:28:06 +0200 Subject: [PATCH] Work on v6 look and feel --- htdocs/compta/bank/releve.php | 268 ++++++++++-------- .../compta/paiement/class/paiement.class.php | 12 +- htdocs/compta/salaries/card.php | 26 +- .../salaries/class/paymentsalary.class.php | 91 +++++- htdocs/fourn/class/paiementfourn.class.php | 12 +- htdocs/fourn/paiement/card.php | 18 +- 6 files changed, 268 insertions(+), 159 deletions(-) diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index fdf1ac27e7a..9d9826d0729 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -92,36 +92,46 @@ if ($id > 0 || ! empty($ref)) // Initialize technical object to manage context to save list fields $contextpage='banktransactionlist'.(empty($object->ref)?'':'-'.$object->id); -/* -*ZIP creation -*/ -if($action=="dl" && $num>0 && isset($_SESSION["releve"][$num])){ - unset($zip); - $log=''; - $filearray=$_SESSION["releve"][$num]; - $zipname = $num.'.zip'; - $zip = new ZipArchive; - $zip->open($zipname, ZipArchive::OVERWRITE); - foreach ($filearray as $key=> $files) { - if(is_array($files)){ - foreach ($files as $file) { - $zip->addFile($file["fullname"],$file["name"]);// - $log.=$key.','.$file["name"]."\n"; - } - }else{ - $log.=$key.','.$langs->trans("Nofile")."\n"; - } - } - $zip->addFromString('log.csv', $log); - $zip->close(); - ///Then download the zipped file. - header('Content-Type: application/zip'); - header('Content-disposition: attachment; filename='.$zipname); - header('Content-Length: ' . filesize($zipname)); - readfile($zipname); + +// ZIP creation +if ($action=="dl" && $numref > 0) +{ + // TODO Replace this with a standard builddoc action that use a document generation module to build the ZIP + $log = ''; + + getAttachedFiles($db, $numref); // Build array $_SESSION["releve"][$numref] with all files to includes + + $filearray = $_SESSION["releve"][$numref]; + $zipname = $numref . '.zip'; + + $zip = new ZipArchive(); + $zip->open($zipname, ZipArchive::OVERWRITE); + foreach ($filearray as $key => $files) { + if (is_array($files)) { + foreach ($files as $file) { + $zip->addFile($file["fullname"], $file["name"]); // + $log .= $key . ',' . $file["name"] . "\n"; + } + } else { + $log .= $key . ',' . $langs->trans("Nofile") . "\n"; + } + } + $zip->addFromString('log '.$numref.'.csv', $log); + $zip->close(); + + // /Then download the zipped file. + header('Content-Type: application/zip'); + header('Content-disposition: attachment; filename=' . $zipname); + header('Content-Length: ' . filesize($zipname)); + + readfile($zipname); + + unset($_SESSION["releve"][$numref]); + + exit; } -unset($_SESSION["releve"][$num]); + /* * View @@ -151,9 +161,7 @@ if ($id > 0) $param.='&id='.urlencode($id); if (empty($numref)) { - /* - * Vue liste tous releves confondus - */ + // List of all standing receipts $sql = "SELECT DISTINCT(b.num_releve) as numr"; $sql.= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql.= " WHERE b.fk_account = ".$object->id; @@ -470,6 +478,14 @@ else $paymentvatstatic->ref=$langs->trans("Payment"); print ' '.$paymentvatstatic->getNomUrl(1); } + elseif ($links[$key]['type']=='payment_salary') + { + print ''; + print ' '.img_object($langs->trans('ShowPayment'),'payment').' '; + print $langs->trans("Payment"); + print ''; + $newline=0; + } elseif ($links[$key]['type']=='banktransfert') { // Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail. if ($objp->amount > 0) @@ -512,6 +528,13 @@ else print ''; $newline=0; } + elseif ($links[$key]['type']=='user') { + print ''; + print img_object($langs->trans('ShowUser'),'user').' '; + print $links[$key]['label']; + print ''; + $newline=0; + } elseif ($links[$key]['type']=='sc') { print ''; print img_object($langs->trans('ShowBill'),'bill').' '; @@ -555,7 +578,6 @@ else dol_print_error($db); } } - print Get_attach_files($db,$objp->rowid,$num,$objp->label); print ""; if ($objp->amount < 0) @@ -598,9 +620,13 @@ else print ""; print "\n"; - // download button - echo ''.$langs->trans('DownloadFile')." \n"; - + + // Add a download button + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // Started a rewrite to make this feature more Dolibarr compliant. Still need dev to be completed. + { + // TODO Replace this with standard box to generate document. + print ''.$langs->trans('DownloadPackageWithAllDocuments')." \n"; + } } @@ -608,102 +634,102 @@ llxFooter(); $db->close(); -/*Function to generate the HTML code used to show the file name & download link attached to the Item covered by the bank line - * @param $db Object database object - * @param $bankId int bank line id - * @param $num int bank statement - * @param $label string label used to optimise the sql querry + + + +/** + * Function to generate the HTML code used to show the file name & download link attached to the Item covered by the bank line * + * @param DoliDB $db database object + * @param int $bankId bank line id + * @param int $num bank statement + * @param string $label label used to optimise the sql querry */ -function Get_attach_files($db, $bankId,$num,$label=''){ - $out=''; - global$conf; - $sql='SELECT u.url_id, u.type,ff.rowid as id , ff.`ref` AS reff, f.facnumber AS `ref`,'; - $sql.=' e.`ref` AS refe, sp.rowid AS ids, d.rowid AS idd'; - $sql.=' FROM '.MAIN_DB_PREFIX.'bank_url AS u'; - if ( !empty($label) || $label=='(CustomerInvoicePayment)'){ - $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'paiement AS p ON p.fk_bank = u.fk_bank'; - $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture AS pf ON pf.fk_paiement = p.rowid'; - $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'facture AS f ON f.rowid = pf.fk_facture'; +function getAttachedFiles($db, $numref, $label='') +{ + $out = ''; + global $conf; + $sql = 'SELECT u.url_id, u.type,ff.rowid as id , ff.`ref` AS reff, f.facnumber AS `ref`,'; + $sql .= ' e.`ref` AS refe, sp.rowid AS ids, d.rowid AS idd'; + $sql .= ' FROM ' . MAIN_DB_PREFIX . 'bank_url AS u, ' . MAIN_DB_PREFIX . 'bank AS b'; + if (! empty($label) || $label == '(CustomerInvoicePayment)') { + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'paiement AS p ON p.fk_bank = u.fk_bank'; + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'paiement_facture AS pf ON pf.fk_paiement = p.rowid'; + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'facture AS f ON f.rowid = pf.fk_facture'; } - if( !empty($label) || $label=='(SupplierInvoicePayment)'){ - //invoice suplier (SupplierInvoicePayment) - $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn AS fp ON fp.fk_bank = u.fk_bank'; - $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn AS fpf ON fpf.fk_paiementfourn = fp.rowid'; - $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn AS ff ON ff.rowid = fpf.fk_facturefourn'; + if (! empty($label) || $label == '(SupplierInvoicePayment)') { + // invoice suplier (SupplierInvoicePayment) + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'paiementfourn AS fp ON fp.fk_bank = u.fk_bank'; + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'paiementfourn_facturefourn AS fpf ON fpf.fk_paiementfourn = fp.rowid'; + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'facture_fourn AS ff ON ff.rowid = fpf.fk_facturefourn'; } - if( !empty($label) || $label=='(ExpenseReportPayment)'){ - //EXPENSEs (ExpenseReportPayment) - $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'payment_expensereport AS ep ON ep.fk_bank = u.fk_bank'; - $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'expensereport AS e ON e.rowid = ep.fk_expensereport'; + if (! empty($label) || $label == '(ExpenseReportPayment)') { + // EXPENSEs (ExpenseReportPayment) + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'payment_expensereport AS ep ON ep.fk_bank = u.fk_bank'; + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'expensereport AS e ON e.rowid = ep.fk_expensereport'; } - if( !empty($label) || $label=='(DonationPayment)'){ - //donation - $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'payment_donation AS dp ON dp.fk_bank = u.fk_bank'; - $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'don AS d ON d.rowid = dp.fk_donation'; + if (! empty($label) || $label == '(DonationPayment)') { + // donation + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'payment_donation AS dp ON dp.fk_bank = u.fk_bank'; + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'don AS d ON d.rowid = dp.fk_donation'; } - if( !empty($label) || $label=='(SalaryPayment)'){ - //loan -// $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'payment_loan AS lp ON lp.fk_bank = u.fk_bank'; - //salary - $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'payment_salary AS sp ON sp.fk_bank = u.fk_bank'; + if (! empty($label) || $label == '(SalaryPayment)') { + // loan + // $sql.=' LEFT JOIN '.MAIN_DB_PREFIX.'payment_loan AS lp ON lp.fk_bank = u.fk_bank'; + // salary + $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'payment_salary AS sp ON sp.fk_bank = u.fk_bank'; } - //END SQL - $sql.=" WHERE u.fk_bank in('".$bankId."')AND u.type in ('payment','payment_supplier','payment_expensereport','payment_salary','payment_donation' )"; + // END SQL + $sql .= " WHERE u.fk_bank = b.rowid AND u.type in ('payment','payment_supplier','payment_expensereport','payment_salary','payment_donation' )"; $resd = $db->query($sql); - $files=array(); - $link=''; - if ($resd) - { - $numd = $db->num_rows($resd); - $upload_dir =''; - $i=0; - if($numd>0) - { - - + $files = array(); + $link = ''; + if ($resd) { + $numd = $db->num_rows($resd); + $upload_dir = ''; + $i = 0; + if ($numd > 0) + { $objd = $db->fetch_object($resd); - - switch($objd->type){ - case "payment": - $subdir=dol_sanitizeFileName($objd->ref); - $upload_dir = $conf->facture->dir_output.'/'.$subdir; - $link="../../document.php?modulepart=facture&file=".str_replace('/','%2F',$subdir).'%2F'; - break; - - case "payment_supplier": - $subdir=get_exdir($objd->id,2,0,0,$objd,'invoice_supplier').$objd->reff; - $upload_dir = $conf->fournisseur->facture->dir_output.'/'.$subdir; - $link="../../document.php?modulepart=facture_fournisseur&file=".str_replace('/','%2F',$subdir).'%2F'; - break; - case "payment_expensereport": - $subdir=dol_sanitizeFileName($objd->refe); - $upload_dir = $conf->expensereport->dir_output.'/'.$subdir; - $link="../../document.php?modulepart=expensereport&file=".str_replace('/','%2F',$subdir).'%2F'; - break; - case "payment_salary": - $subdir=dol_sanitizeFileName($objd->ids); - $upload_dir = $conf->salaries->dir_output.'/'.$subdir; - $link="../../document.php?modulepart=salaries&file=".str_replace('/','%2F',$subdir).'%2F'; - break; - case "payment_donation": - $subdir=get_exdir(null,2,0,1,$objd,'donation'). '/'. dol_sanitizeFileName($objd->idd); - $upload_dir = $conf->don->dir_output . '/' . $subdir; - $link="../../document.php?modulepart=don&file=".str_replace('/','%2F',$subdir).'%2F'; - break; - default: - break; + + switch ($objd->type) { + case "payment": + $subdir = dol_sanitizeFileName($objd->ref); + $upload_dir = $conf->facture->dir_output . '/' . $subdir; + $link = DOL_URL_ROOT."/document.php?modulepart=facture&file=" . str_replace('/', '%2F', $subdir) . '%2F'; + break; + case "payment_supplier": + $subdir = get_exdir($objd->id, 2, 0, 0, $objd, 'invoice_supplier') . $objd->reff; + $upload_dir = $conf->fournisseur->facture->dir_output . '/' . $subdir; + $link = DOL_URL_ROOT."/document.php?modulepart=facture_fournisseur&file=" . str_replace('/', '%2F', $subdir) . '%2F'; + break; + case "payment_expensereport": + $subdir = dol_sanitizeFileName($objd->refe); + $upload_dir = $conf->expensereport->dir_output . '/' . $subdir; + $link = DOL_URL_ROOT."/document.php?modulepart=expensereport&file=" . str_replace('/', '%2F', $subdir) . '%2F'; + break; + case "payment_salary": + $subdir = dol_sanitizeFileName($objd->ids); + $upload_dir = $conf->salaries->dir_output . '/' . $subdir; + $link = DOL_URL_ROOT."/document.php?modulepart=salaries&file=" . str_replace('/', '%2F', $subdir) . '%2F'; + break; + case "payment_donation": + $subdir = get_exdir(null, 2, 0, 1, $objd, 'donation') . '/' . dol_sanitizeFileName($objd->idd); + $upload_dir = $conf->don->dir_output . '/' . $subdir; + $link = DOL_URL_ROOT."/document.php?modulepart=don&file=" . str_replace('/', '%2F', $subdir) . '%2F'; + break; + default: + break; } - if(!empty($upload_dir)){ - $files=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$','',SORT_ASC,1); - foreach ($files as $key => $file){ - $out.= '
'.$file['name'].''; - } - $_SESSION["releve"][$num][]=$files; + if (! empty($upload_dir)) + { + $files = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview\.png)$', '', SORT_ASC, 1); + $_SESSION["releve"][$numref][] = $files; } - } - } - $db->free($resd); - return $out; + } + } + + $db->free($resd); + return $out; } diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 099d05cfa84..61d2b5a3b8a 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -37,7 +37,8 @@ class Paiement extends CommonObject { public $element='payment'; public $table_element='paiement'; - + public $picto = 'payment'; + var $facid; var $datepaye; /** @@ -1016,7 +1017,7 @@ class Paiement extends CommonObject global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage $langs->load('compta'); - if ($mode == 0) + /*if ($mode == 0) { if ($status == 0) return $langs->trans('ToValidate'); if ($status == 1) return $langs->trans('Validated'); @@ -1046,7 +1047,12 @@ class Paiement extends CommonObject if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1'); if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); } - return $langs->trans('Unknown'); + if ($mode == 6) + { + if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1'); + if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); + }*/ + return ''; } } diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index df83f5b9958..569aa81629e 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -202,11 +202,7 @@ if ($id) } } -/* ************************************************************************** */ -/* */ -/* create mode */ -/* */ -/* ************************************************************************** */ +// Create if ($action == 'create') { $year_current = strftime("%Y",dol_now()); @@ -332,19 +328,19 @@ if ($id) $head=salaries_prepare_head($object); - dol_fiche_head($head, 'card', $langs->trans("SalaryPayment"), 0, 'payment'); - - print ''; + dol_fiche_head($head, 'card', $langs->trans("SalaryPayment"), -1, 'payment'); $linkback = ''.$langs->trans("BackToList").''; - print ""; - print ''; + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + print '
'; + print '
'; + + print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); - print '
'; // Employee - print '
'.$langs->trans("Employee").''; + print '
'.$langs->trans("Employee").''; $usersal=new User($db); $usersal->fetch($object->fk_user); print $usersal->getNomUrl(1); @@ -394,7 +390,9 @@ if ($id) $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print '
'; - + + print ''; + dol_fiche_end(); diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index a4bee09d7de..6c151272035 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -33,20 +33,21 @@ class PaymentSalary extends CommonObject { //public $element='payment_salary'; //!< Id that identify managed objects //public $table_element='payment_salary'; //!< Name of table without prefix where object is stored - - var $tms; - var $fk_user; - var $datep; - var $datev; - var $amount; - var $type_payment; - var $num_payment; - var $label; - var $datesp; - var $dateep; - var $fk_bank; - var $fk_user_author; - var $fk_user_modif; + public $picto='payment'; + + public $tms; + public $fk_user; + public $datep; + public $datev; + public $amount; + public $type_payment; + public $num_payment; + public $label; + public $datesp; + public $dateep; + public $fk_bank; + public $fk_user_author; + public $fk_user_modif; /** @@ -547,4 +548,66 @@ class PaymentSalary extends CommonObject } } + + /** + * Retourne le libelle du statut d'une facture (brouillon, validee, abandonnee, payee) + * + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @return string Libelle + */ + function getLibStatut($mode=0) + { + return $this->LibStatut($this->statut,$mode); + } + + /** + * Renvoi le libelle d'un statut donne + * + * @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 + * @return string Libelle du statut + */ + function LibStatut($status,$mode=0) + { + global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage + + $langs->load('compta'); + /*if ($mode == 0) + { + if ($status == 0) return $langs->trans('ToValidate'); + if ($status == 1) return $langs->trans('Validated'); + } + if ($mode == 1) + { + if ($status == 0) return $langs->trans('ToValidate'); + if ($status == 1) return $langs->trans('Validated'); + } + if ($mode == 2) + { + if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate'); + if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated'); + } + if ($mode == 3) + { + if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1'); + if ($status == 1) return img_picto($langs->trans('Validated'),'statut4'); + } + if ($mode == 4) + { + if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate'); + if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated'); + } + if ($mode == 5) + { + if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1'); + 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'),'statut1'); + if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); + }*/ + return ''; + } + } diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 5d8279b1c54..be87fbc7512 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -36,7 +36,8 @@ class PaiementFourn extends Paiement { public $element='payment_supplier'; public $table_element='paiementfourn'; - + public $picto = 'payment'; + var $statut; //Status of payment. 0 = unvalidated; 1 = validated // fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...) // fk_paiement dans llx_paiement_facture est le rowid du paiement @@ -486,7 +487,7 @@ class PaiementFourn extends Paiement global $langs; $langs->load('compta'); - if ($mode == 0) + /*if ($mode == 0) { if ($status == 0) return $langs->trans('ToValidate'); if ($status == 1) return $langs->trans('Validated'); @@ -516,7 +517,12 @@ class PaiementFourn extends Paiement if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1'); if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); } - return $langs->trans('Unknown'); + if ($mode == 6) + { + if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1'); + if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); + }*/ + return ''; } diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 9cb44a92bb8..c8e882e5003 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -179,7 +179,7 @@ $formfile = new FormFile($db); $head = payment_supplier_prepare_head($object); -dol_fiche_head($head, 'payment', $langs->trans('SupplierPayment'), 0, 'payment'); +dol_fiche_head($head, 'payment', $langs->trans('SupplierPayment'), -1, 'payment'); if ($result > 0) { @@ -201,15 +201,23 @@ if ($result > 0) } + $linkback = '' . $langs->trans("BackToList") . ''; + + + dol_banner_tab($object,'id',$linkback,1,'rowid','ref'); + + print '
'; + print '
'; + print ''; - print ''; + /*print ''; print ''; + print '';*/ // Date payment - print ''; @@ -270,6 +278,8 @@ if ($result > 0) print '
'.$langs->trans('Ref').''; print $form->showrefnav($object,'id','',1,'rowid','ref'); - print '
'.$form->editfieldkey("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).''; + print '
'.$form->editfieldkey("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).''; print $form->editfieldval("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded')); print '
'; + print '
'; + print '
'; /**