diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php index 47de225807e..0408f580fda 100644 --- a/htdocs/adherents/adherent.class.php +++ b/htdocs/adherents/adherent.class.php @@ -788,7 +788,7 @@ class Adherent { $acct=new Account($this->db,$accountid); - $dateop=strftime("%Y%m%d",time()); + $dateop=time(); $insertid=$acct->addline($dateop, $operation, $label, $montant, $num_chq, '', $user); if ($insertid > 0) diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index eb54ff62b2e..724d3e9ed46 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -59,7 +59,7 @@ if ($_POST["action"] == '2bank' && $_POST["rowid"] !='') // \todo Créer une facture et enregistrer son paiement - $dateop=strftime("%Y%m%d",time()); + $dateop=time(); $sql="SELECT cotisation FROM ".MAIN_DB_PREFIX."cotisation WHERE rowid=".$_POST["rowid"]." "; $result = $db->query($sql); if ($result) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index b35ad62e055..97b79199dda 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -308,7 +308,7 @@ if ($_POST["action"] == 'add') // insertion dans la gestion banquaire si configure pour if ($global->conf->ADHERENT_BANK_USE) { - $dateop=strftime("%Y%m%d",time()); + $dateop=time(); $amount=$cotisation; $acct=new Account($db,$_POST["accountid"]); $insertid=$acct->addline($dateop, $_POST["operation"], $_POST["label"], $amount, $_POST["num_chq"], '', $user); diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 98838339b7d..54cf01106a6 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -69,7 +69,7 @@ print ''.$langs->trans("Name").''; print ''.$langs->trans("Value").''; print ''.$langs->trans("Type").''; print ''.$langs->trans("Note").''; -print ''.$langs->trans("Action").''; +print ''.$langs->trans("Action").''; print "\n"; @@ -82,21 +82,17 @@ print '
'; print ''; print "\n"; - print ''; -print ''; +print ''; print ''; - $form->select_array('consttype',array('yesno','texte','chaine'),2); print ''; - -print ''; -print ''; - +print ''; +print ''; print '
'; print "\n"; - print ''; + print '
'; @@ -143,15 +139,15 @@ if ($result) } else { - print ''; + print ''; print ''; $form->select_array('consttype',array('yesno','texte','chaine'),2); } print ''; // Note - print ''; - print ''; + print ''; + print ''; print '   '; print ''.img_delete().''; print "\n"; diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php index 1c116a95084..183680ee608 100644 --- a/htdocs/compta/bank/account.class.php +++ b/htdocs/compta/bank/account.class.php @@ -189,79 +189,93 @@ class Account } } - /** - \brief Ajoute une entree dans la table ".MAIN_DB_PREFIX."bank - \return int rowid de l'entrée ajoutée, <0 si erreur - */ - function addline($date, $oper, $label, $amount, $num_chq='', $categorie='', $user='',$emetteur='',$banque='') - { - dolibarr_syslog("Account::Addline: date=".$date.", oper=".$oper.", label=".$label.", amount=".$amount.", num_chq=".$num_chq.", categorie=".$categorie.", user=".$user->id); - if ($this->rowid) - { - $this->db->begin(); - - switch ($oper) - { - case 1: - $oper = 'TIP'; - break; - case 2: - $oper = 'VIR'; - break; - case 3: - $oper = 'PRE'; - break; - case 4: - $oper = 'LIQ'; - break; - case 5: - $oper = 'VAD'; - break; - case 6: - $oper = 'CB'; - break; - case 7: - $oper = 'CHQ'; - break; - } + /** + \brief Ajoute une entree dans la table ".MAIN_DB_PREFIX."bank + \param $date Date TMS opération + \param $oper 1,2,3,4... + \param $label Descripton + \param $amount Montant + \param $num_chq Numero cheque ou virement + \param $categorie Categorie optionnelle + \param $user Utilisateur qui crée + \param $emetteur Nom emetteur + \param $banque Banque emettrice + \return int Rowid de l'entrée ajoutée, <0 si erreur + */ + function addline($date, $oper, $label, $amount, $num_chq='', $categorie='', $user, $emetteur='',$banque='') + { + // Nettoyage parametres + $emetteur=trim($emetteur); + $banque=trim($banque); + + dolibarr_syslog("Account::Addline: date=".$date.", oper=".$oper.", label=".$label.", amount=".$amount.", num_chq=".$num_chq.", categorie=".$categorie.", user=".$user->id); - $datev = $date; + // Verififcation parametres + if (! $this->rowid) + { + $this->error="Account::addline rowid not defined"; + return -1; + } - $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank (datec, dateo, datev, label, amount, fk_user_author, num_chq, fk_account, fk_type,emetteur,banque)"; - $sql.= " VALUES (now(),'".$date."','$datev','".addslashes($label)."','" . price2num($amount)."','".$user->id."','$num_chq','".$this->rowid."', '$oper'"; - $sql.= ",'".addslashes(trim($emetteur))."'"; - $sql.= ",'".addslashes(trim($banque))."');"; + $this->db->begin(); + + switch ($oper) + { + case 1: + $oper = 'TIP'; + break; + case 2: + $oper = 'VIR'; + break; + case 3: + $oper = 'PRE'; + break; + case 4: + $oper = 'LIQ'; + break; + case 5: + $oper = 'VAD'; + break; + case 6: + $oper = 'CB'; + break; + case 7: + $oper = 'CHQ'; + break; + } - if ($this->db->query($sql)) - { - $rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."bank"); - if ($categorie) - { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class (lineid, fk_categ) VALUES ('$rowid', '$categorie')"; - $result = $this->db->query($sql); - if (! $result) - { - $this->db->rollback(); - $this->error=$this->db->error(); - return -3; - } - } - $this->db->commit(); - return $rowid; - } - else - { - $this->db->rollback(); - $this->error=$this->db->error(); - return -2; - } - } - else - { - $this->error="Account::addline rowid not defined"; - return -1; - } - } + $datev = $date; + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank (datec, dateo, datev, label, amount, fk_user_author, num_chq, fk_account, fk_type,emetteur,banque)"; + $sql.= " VALUES (now(),'".$this->db->idate($date)."','".$this->db->idate($datev)."',"; + $sql.= "'".addslashes($label)."','" . price2num($amount)."','".$user->id."','$num_chq','".$this->rowid."', '$oper'"; + $sql.= ",'".addslashes($emetteur)."'"; + $sql.= ",'".addslashes($banque)."');"; + + if ($this->db->query($sql)) + { + $rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."bank"); + if ($categorie) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class (lineid, fk_categ) VALUES ('$rowid', '$categorie')"; + $result = $this->db->query($sql); + if (! $result) + { + $this->db->rollback(); + $this->error=$this->db->error(); + return -3; + } + } + $this->db->commit(); + return $rowid; + } + else + { + $this->db->rollback(); + $this->error=$this->db->error(); + return -2; + } + } /* * \brief Creation du compte bancaire en base diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 0af409eefac..1662277801b 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -43,14 +43,17 @@ $vline=isset($_GET["vline"])?$_GET["vline"]:$_POST["vline"]; $action=isset($_GET["action"])?$_GET["action"]:$_POST["action"]; $page=isset($_GET["page"])?$_GET["page"]:0; +$mesg=''; + /* * Action */ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]) && $user->rights->banque->modifier) { - if ($_POST["credit"] > 0) + + if ($_POST["credit"] > 0) { $amount = $_POST["credit"]; } @@ -59,25 +62,35 @@ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]) && $user- $amount = - $_POST["debit"]; } - $dateop = $_POST["dateoy"].$_POST["dateo"]; - $operation=$_POST["operation"]; - $label=$_POST["label"]; + $dateop = dolibarr_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]); $operation=$_POST["operation"]; $num_chq=$_POST["num_chq"]; + $label=$_POST["label"]; $cat1=$_POST["cat1"]; - $acct=new Account($db,$account); + if (! $dateop) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Date")); + if (! $operation) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Type")); + if (! $amount) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Amount")); + + if (! $mesg) + { + $acct=new Account($db,$account); - $insertid = $acct->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user); - if ($insertid > 0) - { - Header("Location: account.php?account=" . $account); - exit; - } - else - { - dolibarr_print_error($db,$acct->error); - } + $insertid = $acct->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user); + if ($insertid > 0) + { + Header("Location: account.php?account=" . $account); + exit; + } + else + { + dolibarr_print_error($db,$acct->error); + } + } + else + { + $_GET["action"]='addline'; + } } if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"]=='yes' && $user->rights->banque->modifier) { @@ -194,25 +207,28 @@ if ($account > 0) dolibarr_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0); + if ($mesg) print '
'.$mesg.'
'; + + /** * Bandeau recherche */ - $mesg=''; + $navig=''; $nbpage=floor($total_lines/$viewline)+($total_lines % $viewline > 0?1:0); // Nombre de page total if ($limitsql > $viewline) { - $mesg.=''.img_previous().''; + $navig.=''.img_previous().''; } - $mesg.= ' Page '.($nbpage-$page).'/'.$nbpage.' '; + $navig.= ' Page '.($nbpage-$page).'/'.$nbpage.' '; if ($total_lines > $limitsql ) { - $mesg.= ''.img_next().''; + $navig.= ''.img_next().''; } if (! $_GET["action"]=='addline' && ! $_GET["action"]=='delete') { $titre=$langs->trans("FinancialAccount")." : ".$acct->label; - print_fiche_titre($titre,$mesg); + print_fiche_titre($titre,$navig); } if ($_GET["action"]=='delete') @@ -222,15 +238,10 @@ if ($account > 0) print '
'; } - + print ''; - /* - * Affiche tableau des transactions bancaires - * - */ - // Formulaire de saisie d'une opération hors factures if ($user->rights->banque->modifier && $_GET["action"]=='addline') { @@ -246,16 +257,21 @@ if ($account > 0) print ''; print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''; - print ''; - print ''; + print ''; print '\n"; } + /* + * Affiche tableau des transactions bancaires + * + */ + // Ligne de titre tableau des acritures print ''; print ''; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index e53371648a0..0ba7812a41e 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -56,10 +56,10 @@ if ($_POST['action'] == 'add_paiement' || $_POST['action'] == 'confirm_paiement' { $error = 0; - $datepaye = $db->idate(mktime(12, 0 , 0, + $datepaye = dolibarr_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], - $_POST['reyear'])); + $_POST['reyear']); $paiement_id = 0; // Verifie si des paiements sont supérieurs au montant facture diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php index 13e3ca47508..05ace48df98 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/fiche.php @@ -48,7 +48,7 @@ $mesg=''; * Actions */ -if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user->rights->facture->creer) +if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user->rights->facture->paiement) { $db->begin(); @@ -68,7 +68,7 @@ if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user- } } -if ($_POST['action'] == 'confirm_valide' && $_POST['confirm'] == 'yes' && $user->rights->facture->creer) +if ($_POST['action'] == 'confirm_valide' && $_POST['confirm'] == 'yes' && $user->rights->facture->paiement) { $db->begin(); @@ -129,7 +129,7 @@ dolibarr_fiche_head($head, $hselected, $langs->trans("Payment").": ".$paiement-> */ if ($_GET['action'] == 'delete') { - $html->form_confirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), 'Etes-vous sûr de vouloir supprimer ce paiement ?', 'confirm_delete'); + $html->form_confirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete'); print '
'; } @@ -262,13 +262,18 @@ print '
'; if ($user->societe_id == 0 && $paiement->statut == 0 && $_GET['action'] == '') { - print ''.$langs->trans('Valid').''; -} + if ($user->rights->facture->paiement) + { + print ''.$langs->trans('Valid').''; + } +} if ($user->societe_id == 0 && $allow_delete && $paiement->statut == 0 && $_GET['action'] == '') { - print ''.$langs->trans('Delete').''; - + if ($user->rights->facture->paiement) + { + print ''.$langs->trans('Delete').''; + } } print '
'; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index b62db09d2a7..bd5ad91920a 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -32,7 +32,7 @@ require('./pre.inc.php'); -require('./paiementfourn.class.php'); +require(DOL_DOCUMENT_ROOT.'/fourn/facture/paiementfourn.class.php'); $langs->load('companies'); $langs->load('bills'); @@ -61,10 +61,10 @@ if ($action == 'add_paiement') { $error = 0; - $datepaye = $db->idate(mktime(12, 0 , 0, - $_POST['remonth'], - $_POST['reday'], - $_POST['reyear'])); + $datepaye = dolibarr_mktime(12, 0 , 0, + $_POST['remonth'], + $_POST['reday'], + $_POST['reyear']); $paiement_id = 0; $total = 0; // Génère tableau des montants amounts diff --git a/htdocs/fourn/facture/paiementfourn.class.php b/htdocs/fourn/facture/paiementfourn.class.php index c3fe1f37be8..ae75dcb8eb7 100644 --- a/htdocs/fourn/facture/paiementfourn.class.php +++ b/htdocs/fourn/facture/paiementfourn.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * * This program is free software; you can redistribute it and/or modify @@ -21,7 +21,7 @@ * $Source$ */ -/*! +/** \file htdocs/fourn/facture/paiementfourn.class.php \ingroup fournisseur, facture \brief Page de création de paiement factures fournisseurs @@ -140,7 +140,7 @@ class PaiementFourn if ($this->total <> 0) // On accepte les montants négatifs { $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiementfourn (datec, datep, amount, fk_paiement, num_paiement, note, fk_user_author)'; - $sql .= ' VALUES (now(), '.$this->datepaye.', \''.$this->total.'\', '.$this->paiementid.', \''.$this->num_paiement.'\', \''.$this->note.'\', '.$user->id.')'; + $sql .= ' VALUES (now(), '.$this->db->idate($this->datepaye).', \''.$this->total.'\', '.$this->paiementid.', \''.$this->num_paiement.'\', \''.$this->note.'\', '.$user->id.')'; $resql = $this->db->query($sql); if ($resql) { @@ -309,6 +309,8 @@ class PaiementFourn function valide() { $sql = 'UPDATE '.MAIN_DB_PREFIX.'paiementfourn SET statut = 1 WHERE rowid = '.$this->id; + + dolibarr_syslog("PaiementFourn::valide sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -316,7 +318,8 @@ class PaiementFourn } else { - dolibarr_syslog('Paiement::Valide Error -1'); + $this->error='Paiement::Valide Error -1 '.$this->db->error(); + dolibarr_syslog('PaiementFourn::valide error '.$this->error); return -1; } } @@ -331,6 +334,7 @@ class PaiementFourn $sql .= ', '.$this->db->pdate('tms').' as tms'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn as c'; $sql .= ' WHERE c.rowid = '.$id; + $resql = $this->db->query($sql); if ($resql) { @@ -397,5 +401,57 @@ class PaiementFourn } } + /** + * \brief Retourne le libellé du statut d'une facture (brouillon, validée, abandonnée, payée) + * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto + * \return string Libelle + */ + function getLibStatut($mode=0) + { + return $this->LibStatut($this->statut,$mode); + } + + /** + * \brief Renvoi le libellé d'un statut donne + * \param status Statut + * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto + * \return string Libellé du statut + */ + function LibStatut($status,$mode=0) + { + global $langs; // TODO Renvoyer le libellé 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'); + } + return $langs->trans('Unknown'); + } } ?> diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/fiche.php index 448dea4b594..2485425bb79 100644 --- a/htdocs/fourn/paiement/fiche.php +++ b/htdocs/fourn/paiement/fiche.php @@ -35,10 +35,12 @@ require('./pre.inc.php'); require(DOL_DOCUMENT_ROOT.'/fourn/facture/paiementfourn.class.php'); $user->getrights('facture'); +$user->getrights('fournisseur'); $langs->load('bills'); $langs->load('banks'); $langs->load('companies'); +$langs->load("suppliers"); $mesg=''; @@ -47,7 +49,7 @@ $mesg=''; * Actions */ -if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user->rights->facture->creer) +if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user->rights->fournisseur->facture->supprimer) { $db->begin(); @@ -67,7 +69,7 @@ if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user- } } -if ($_POST['action'] == 'confirm_valide' && $_POST['confirm'] == 'yes' && $user->rights->facture->creer) +if ($_POST['action'] == 'confirm_valide' && $_POST['confirm'] == 'yes' && $user->rights->fournisseur->facture->valider) { $db->begin(); @@ -110,7 +112,7 @@ $head[$h][1] = $langs->trans('Info'); $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans('Payment').': '.$paiement->ref); +dolibarr_fiche_head($head, $hselected, $langs->trans('SupplierPayment')); /* * Confirmation de la suppression du paiement @@ -162,13 +164,13 @@ if ($paiement->numero) print ''; } print ''; +print ''; print ''; print '
YYYY MMDD'.$langs->trans("Type").''.$langs->trans("Description").''.$langs->trans("Debit").''.$langs->trans("Credit").' '; - print '
'.$langs->trans("Date").' '.$langs->trans("Type").''.$langs->trans("Description").''.$langs->trans("Debit").''.$langs->trans("Credit").' 
'; - print ''; - print ''; - $html->select_types_paiements('','operation','1,2',1); + print ''; + $html->select_date(-1,'op',0,0,0,'transaction'); + print ''; + $html->select_types_paiements('','operation','1,2',1,1); print ''; print ''; @@ -275,6 +291,11 @@ if ($account > 0) print "
 
'.$langs->trans("Date").''.$langs->trans("Value").''.$langs->trans("Type").''.$langs->trans("Description").'
'.$langs->trans('Numero').''.$paiement->numero.'
'.$langs->trans('Amount').''.price($paiement->montant).' '.$langs->trans('Currency'.$conf->monnaie).'
'.$langs->trans('Status').''.$paiement->getLibStatut(4).'
'.$langs->trans('Note').''.nl2br($paiement->note).'
'; -/* - * - * +/** + * Liste des factures */ $allow_delete = 1 ; $sql = 'SELECT f.facnumber, f.total_ttc, pf.amount, f.rowid as facid, f.paye, f.fk_statut, s.nom, s.idp'; @@ -234,15 +236,21 @@ print ''; */ print '
'; - if ($user->societe_id == 0 && $paiement->statut == 0 && $_GET['action'] == '') { - print ''.$langs->trans('Valid').''; -} + if ($user->rights->fournisseur->facture->valider) + { + print ''.$langs->trans('Valid').''; + } +} if ($user->societe_id == 0 && $allow_delete && $paiement->statut == 0 && $_GET['action'] == '') { - print ''.$langs->trans('Delete').''; + if ($user->rights->fournisseur->facture->supprimer) + { + print ''.$langs->trans('Delete').''; + + } } print '
'; diff --git a/htdocs/fourn/paiement/info.php b/htdocs/fourn/paiement/info.php index 0845f2a8feb..82b9bfb43fb 100644 --- a/htdocs/fourn/paiement/info.php +++ b/htdocs/fourn/paiement/info.php @@ -31,6 +31,7 @@ require("./pre.inc.php"); require(DOL_DOCUMENT_ROOT."/fourn/facture/paiementfourn.class.php"); $langs->load("bills"); +$langs->load("suppliers"); $langs->load("companies"); llxHeader(); @@ -45,7 +46,7 @@ $head[$h][1] = $langs->trans("Info"); $hselected = $h; $h++; -dolibarr_fiche_head($head, $hselected, $langs->trans("Payment").": ".$_GET["id"]); +dolibarr_fiche_head($head, $hselected, $langs->trans("SupplierPayment")); /* diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 1082861040a..5d1d9791adb 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -1144,12 +1144,13 @@ class Form * \param htmlname Nom de la zone select * \param filtertype Pour filtre * \param format 0=id+libelle, 1=code+code, 2=code+libelle + * \param empty 1=peut etre vide, 0 sinon */ - function select_types_paiements($selected='',$htmlname='paiementtype',$filtertype='',$format=0) + function select_types_paiements($selected='',$htmlname='paiementtype',$filtertype='',$format=0, $empty=0) { global $langs; - dolibarr_syslog("Form::select_type_paiements $selected, $htmlname, $filtertype, $format",LOG_DEBUG); + dolibarr_syslog("Form::select_type_paiements $selected, $htmlname, $filtertype, $format",LOG_DEBUG); $filterarray=array(); if ($filtertype == 'CRDT') $filterarray=array(0,2); @@ -1159,6 +1160,7 @@ class Form $this->load_cache_types_paiements(); print '