diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 95f453d5651..057e8e334e4 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * * This program is free software; you can redistribute it and/or modify @@ -119,7 +119,7 @@ if ($_POST['action'] == 'add_paiement') if ($conf->banque->enabled) { // Insertion dans llx_bank - $label = 'Règlement facture'; + $label = "(CustomerInvoicePayment)"; $acc = new Account($db, $_POST['accountid']); //paiementid contient "CHQ ou VIR par exemple" $bank_line_id = $acc->addline($paiement->datepaye, @@ -171,6 +171,7 @@ if ($_POST['action'] == 'add_paiement') $loc = DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$paiement_id; $db->commit(); Header('Location: '.$loc); + exit; } else { diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php index 1a37d277934..a8376fc600d 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/fiche.php @@ -24,7 +24,8 @@ /** \file htdocs/compta/paiement/fiche.php \ingroup facture - \brief Onglet paiement d'un paiement + \brief Onglet paiement d'un paiement client + \remarks Fichier presque identique a fournisseur/paiement/fiche.php \version $Revision$ */ @@ -183,14 +184,18 @@ if ($resql) $total = 0; print '
'; print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print "\n"; if ($num > 0) { $var=True; + $facturestatic=new Facture($db); + while ($i < $num) { $objp = $db->fetch_object($resql); @@ -199,10 +204,9 @@ if ($resql) print '\n"; + print ''; print ''; print ''; - $fac=new Facture($db); - print ''; print "\n"; if ($objp->paye == 1) { diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index 1f38124d790..15516def055 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -1326,6 +1326,7 @@ class Facture * \param paye Etat paye * \param statut Id statut * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto + * \param alreadypayed Montant deja payé * \return string Libellé du statut */ function LibStatut($paye,$statut,$mode=0,$alreadypayed=-1) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 4b94f89f590..b05d626fd32 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -120,7 +120,7 @@ if ($action == 'add_paiement') if ($conf->banque->enabled) { // Insertion dans llx_bank - $label = 'Règlement fournisseur'; + $label = "(SupplierInvoicePayment)"; $acc = new Account($db, $_POST['accountid']); //paiementid contient "CHQ ou VIR par exemple" $bank_line_id = $acc->addline($paiement->datepaye, diff --git a/htdocs/fourn/facture/paiementfourn.class.php b/htdocs/fourn/facture/paiementfourn.class.php index fe6466c7952..2209b02b263 100644 --- a/htdocs/fourn/facture/paiementfourn.class.php +++ b/htdocs/fourn/facture/paiementfourn.class.php @@ -25,6 +25,7 @@ \file htdocs/fourn/facture/paiementfourn.class.php \ingroup fournisseur, facture \brief Page de création de paiement factures fournisseurs + \remarks Cette classe est presque identique à paiement.class.php \version $Revision$ */ @@ -120,23 +121,23 @@ class PaiementFourn */ function create($user) { - $sql_err = 0; + $error = 0; - $this->db->begin(); - - $this->total = 0.0; + // Nettoyage parametres + $value = price2num($value); + $this->total = 0; foreach ($this->amounts as $key => $value) { - $val = price2num($value); - if (is_numeric($val)) - { - $val = price2num(round($val, 2)); - $this->total += $val; - } + $val = round($value, 2); $this->amounts[$key] = $val; + $this->total += $val; } $this->total = price2num($this->total); - if ($this->total <> 0) /* On accepte les montants négatifs pour les avoirs ??? */ + + + $this->db->begin(); + + 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.')'; @@ -144,6 +145,8 @@ class PaiementFourn if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'paiementfourn'); + + // Insere tableau des montants / factures foreach ($this->amounts as $key => $amount) { $facid = $key; @@ -154,7 +157,7 @@ class PaiementFourn if (! $this->db->query($sql) ) { dolibarr_syslog('Paiement::Create Erreur INSERT dans paiement_facture '.$facid); - $sql_err++; + $error++; } } else @@ -162,15 +165,25 @@ class PaiementFourn dolibarr_syslog('PaiementFourn::Create Montant non numérique'); } } + + if (! $error) + { + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('PAYMENT_SUPPLIER_CREATE',$this,$user,$lang,$conf); + if ($result < 0) $error++; + // Fin appel triggers + } } else { dolibarr_syslog('PaiementFourn::Create Erreur INSERT dans paiementfourn'); - $sql_err++; + $error++; } } - if ( $this->total <> 0 && $sql_err == 0 ) // On accepte les montants négatifs + if ( $this->total <> 0 && $error == 0 ) // On accepte les montants négatifs { $this->db->commit(); dolibarr_syslog('PaiementFourn::Create Ok Total = '.$this->total); diff --git a/htdocs/fourn/fournisseur.facture.class.php b/htdocs/fourn/fournisseur.facture.class.php index 9c5b5fe5c0c..1fb72ad6319 100644 --- a/htdocs/fourn/fournisseur.facture.class.php +++ b/htdocs/fourn/fournisseur.facture.class.php @@ -29,13 +29,15 @@ \version $Revision$ */ +include_once(DOL_DOCUMENT_ROOT."/facture.class.php"); + /** \class FactureFournisseur \brief Classe permettant la gestion des factures fournisseurs */ -class FactureFournisseur +class FactureFournisseur extends Facture { var $id; var $db; @@ -504,144 +506,6 @@ class FactureFournisseur } } - - /** - * \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 - * \return string Libelle - */ - function getLibStatut($mode=0) - { - return $this->LibStatut($this->paye,$this->statut,$mode); - } - - /** - * \brief Renvoi le libellé d'un statut donné - * \param paye Etat paye - * \param statut Id 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($paye,$statut,$mode=0) - { - global $langs; - $langs->load('bills'); - - if ($mode == 0) - { - $prefix=''; - if (! $paye) - { - if ($statut == 0) return $langs->trans('Bill'.$prefix.'StatusDraft'); - if ($statut == 3) return $langs->trans('Bill'.$prefix.'StatusCanceled'); - if ($alreadypayed <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPayed'); - return $langs->trans('Bill'.$prefix.'StatusStarted'); - } - else - { - return $langs->trans('Bill'.$prefix.'StatusPayed'); - } - } - if ($mode == 1) - { - $prefix='Short'; - if (! $paye) - { - if ($statut == 0) return $langs->trans('Bill'.$prefix.'StatusDraft'); - if ($statut == 3) return $langs->trans('Bill'.$prefix.'StatusCanceled'); - if ($alreadypayed <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPayed'); - return $langs->trans('Bill'.$prefix.'StatusStarted'); - } - else - { - return $langs->trans('Bill'.$prefix.'StatusPayed'); - } - } - if ($mode == 2) - { - $prefix='Short'; - if (! $paye) - { - if ($statut == 0) return img_picto($langs->trans('Bill'.$prefix.'StatusDraft'),'statut0').' '.$langs->trans('Bill'.$prefix.'StatusDraft'); - if ($statut == 3) return img_picto($langs->trans('Bill'.$prefix.'StatusCanceled'),'statut5').' '.$langs->trans('Bill'.$prefix.'StatusCanceled'); - if ($alreadypayed <= 0) return img_picto($langs->trans('Bill'.$prefix.'StatusNotPayed'),'statut1').' '.$langs->trans('Bill'.$prefix.'StatusNotPayed'); - return img_picto($langs->trans('Bill'.$prefix.'StatusStarted'),'statut3').' '.$langs->trans('Bill'.$prefix.'StatusStarted'); - } - else - { - return img_picto($langs->trans('Bill'.$prefix.'StatusPayed'),'statut6').' '.$langs->trans('Bill'.$prefix.'StatusPayed'); - } - } - if ($mode == 3) - { - $prefix='Short'; - if (! $paye) - { - if ($statut == 0) return img_picto($langs->trans('Bill'.$prefix.'StatusDraft'),'statut0'); - if ($statut == 3) return img_picto($langs->trans('Bill'.$prefix.'StatusCanceled'),'statut5'); - if ($alreadypayed <= 0) return img_picto($langs->trans('Bill'.$prefix.'StatusNotPayed'),'statut1'); - return img_picto($langs->trans('Bill'.$prefix.'StatusStarted'),'statut3'); - } - else - { - return img_picto($langs->trans('Bill'.$prefix.'StatusPayed'),'statut6'); - } - } - if ($mode == 4) - { - if (! $paye) - { - if ($statut == 0) return img_picto($langs->trans('BillStatusDraft'),'statut0').' '.$langs->trans('BillStatusDraft'); - if ($statut == 3) return img_picto($langs->trans('BillStatusCanceled'),'statut5').' '.$langs->trans('BillStatusCanceled'); - if ($alreadypayed <= 0) return img_picto($langs->trans('BillStatusNotPayed'),'statut1').' '.$langs->trans('BillStatusNotPayed'); - return img_picto($langs->trans('BillStatusStarted'),'statut3').' '.$langs->trans('BillStatusStarted'); - } - else - { - return img_picto($langs->trans('BillStatusPayed'),'statut6').' '.$langs->trans('BillStatusPayed'); - } - } - if ($mode == 5) - { - $prefix='Short'; - if (! $paye) - { - if ($statut == 0) return $langs->trans('Bill'.$prefix.'StatusDraft').' '.img_picto($langs->trans('Bill'.$prefix.'StatusDraft'),'statut0'); - if ($statut == 3) return $langs->trans('Bill'.$prefix.'StatusCanceled').' '.img_picto($langs->trans('Bill'.$prefix.'StatusCanceled'),'statut5'); - if ($alreadypayed <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPayed').' '.img_picto($langs->trans('Bill'.$prefix.'StatusNotPayed'),'statut1'); - return $langs->trans('Bill'.$prefix.'StatusStarted').' '.img_picto($langs->trans('Bill'.$prefix.'StatusStarted'),'statut3'); - } - else - { - return $langs->trans('Bill'.$prefix.'StatusPayed').' '.img_picto($langs->trans('Bill'.$prefix.'StatusPayed'),'statut6'); - } - } - } - - /** - * \brief Renvoi le libellé court d'un statut donné - * \param paye etat paye - * \param statut id statut - * \param amount amount already payed - * \return string Libellé court du statut - */ - function PayedLibStatut($paye,$statut,$amount=0) - { - global $langs; - $langs->load('bills'); - if (! $paye) - { - if ($statut == 0) return $langs->trans('BillShortStatusDraft'); - if ($statut == 3) return $langs->trans('BillStatusCanceled'); - if ($amount) return $langs->trans('BillStatusStarted'); - return $langs->trans('BillStatusNotPayed'); - } - else - { - return $langs->trans('BillStatusPayed'); - } - } - /** * \brief Charge indicateurs this->nbtodo et this->nbtodolate de tableau de bord diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/fiche.php index f32f008d6bf..0db280b0d30 100644 --- a/htdocs/fourn/paiement/fiche.php +++ b/htdocs/fourn/paiement/fiche.php @@ -23,8 +23,9 @@ /** \file htdocs/fourn/paiement/fiche.php - \ingroup facture - \brief Onglet paiement d'un paiement + \ingroup facture, fournisseur + \brief Onglet paiement d'un paiement fournisseur + \remarks Fichier presque identique a compta/paiement/fiche.php \version $Revision$ */ @@ -193,7 +194,8 @@ if ($resql) { $var=True; - $fac_static=new FactureFournisseur($db); + $facturestatic=new FactureFournisseur($db); + while ($i < $num) { $objp = $db->fetch_object($resql); @@ -202,7 +204,7 @@ if ($resql) print '\n"; - print ''; + print ''; print ''; print ''; print "\n"; diff --git a/htdocs/includes/triggers/interface_demo.class.php b/htdocs/includes/triggers/interface_demo.class.php index 1691e93481e..45eea127e94 100644 --- a/htdocs/includes/triggers/interface_demo.class.php +++ b/htdocs/includes/triggers/interface_demo.class.php @@ -127,6 +127,31 @@ class InterfaceDemo { dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); } + // Products + elseif ($action == 'PRODUCT_CREATE') + { + dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); + } + elseif ($action == 'PRODUCT_MODIFY') + { + dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); + } + elseif ($action == 'PRODUCT_DELETE') + { + dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); + } + elseif ($action == 'ORDER_CREATE') + { + dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); + } + elseif ($action == 'ORDER_MODIFY') + { + dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); + } + elseif ($action == 'ORDER_DELETE') + { + dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); + } // Proposals elseif ($action == 'PROPAL_CREATE') { @@ -194,28 +219,12 @@ class InterfaceDemo { dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); } - // Products - elseif ($action == 'PRODUCT_CREATE') + // Payments + elseif ($action == 'PAYMENT_CUSTOMER_CREATE') { dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); } - elseif ($action == 'PRODUCT_MODIFY') - { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); - } - elseif ($action == 'PRODUCT_DELETE') - { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); - } - elseif ($action == 'ORDER_CREATE') - { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); - } - elseif ($action == 'ORDER_MODIFY') - { - dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); - } - elseif ($action == 'ORDER_DELETE') + elseif ($action == 'PAYMENT_SUPPLIER_CREATE') { dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); } diff --git a/htdocs/includes/triggers/interface_webcal.class.php b/htdocs/includes/triggers/interface_webcal.class.php index db49e2a4099..8de013ae7d9 100644 --- a/htdocs/includes/triggers/interface_webcal.class.php +++ b/htdocs/includes/triggers/interface_webcal.class.php @@ -275,6 +275,31 @@ class InterfaceWebCal $this->desc=$langs->trans("InvoiceCanceledInDolibarr",$object->ref); $this->desc.="\n".$langs->trans("Author").': '.$user->code; } + // Payments + elseif ($action == 'PAYMENT_CUSTOMER_CREATE') + { + dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); + $langs->load("other"); + + $this->date=time(); + $this->duree=0; + $this->texte=$langs->trans("CustomerPaymentDoneInDolibarr",$object->ref); + $this->desc=$langs->trans("CustomerPaymentDoneInDolibarr",$object->ref); + $this->desc.="\n".$langs->trans("AmountTTC").': '.$object->total; + $this->desc.="\n".$langs->trans("Author").': '.$user->code; + } + elseif ($action == 'PAYMENT_SUPPLIER_CREATE') + { + dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); + $langs->load("other"); + + $this->date=time(); + $this->duree=0; + $this->texte=$langs->trans("SupplierPaymentDoneInDolibarr",$object->ref); + $this->desc=$langs->trans("SupplierPaymentDoneInDolibarr",$object->ref); + $this->desc.="\n".$langs->trans("AmountTTC").': '.$object->total; + $this->desc.="\n".$langs->trans("Author").': '.$user->code; + } // Ajoute entrée dans webcal if ($this->date) diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 758377229fd..f9951e97c48 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -61,6 +61,7 @@ PropalValidatedInDolibarr=Proposal %s validated in Dolibarr InvoiceValidatedInDolibarr=Invoice %s validated in Dolibarr InvoicePayedInDolibarr=Invoice %s changed to payed in Dolibarr InvoiceCanceledInDolibarr=Invoice %s canceled in Dolibarr +PaymentDoneInDolibarr=Payment %s done in Dolibarr ##### Export ##### ExportsArea=Exports area AvailableFormats=Available formats diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index e45494a8c8f..7f5a652c1e5 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -61,6 +61,9 @@ PropalValidatedInDolibarr=Proposition %s valid InvoiceValidatedInDolibarr=Facture %s validée dans Dolibarr InvoicePayedInDolibarr=Facture %s passée à payée dans Dolibarr InvoiceCanceledInDolibarr=Facture %s annulée dans Dolibarr +PaymentDoneInDolibarr=Paiement %s réalisé dans Dolibarr +CustomerPaymentDoneInDolibarr=Paiement client %s dans Dolibarr +SupplierPaymentDoneInDolibarr=Paiement fournisseur %s dans Dolibarr ##### Export ##### ExportsArea=Espace exports AvailableFormats=Formats disponibles diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php index de932e14314..10c74948f2d 100644 --- a/htdocs/paiement.class.php +++ b/htdocs/paiement.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * * This program is free software; you can redistribute it and/or modify @@ -25,6 +25,7 @@ \file htdocs/paiement.class.php \ingroup facture \brief Fichier de la classe des paiement de factures clients + \remarks Cette classe est presque identique à paiementfourn.class.php \version $Revision$ */ @@ -40,6 +41,7 @@ class Paiement var $facid; var $datepaye; var $amount; + var $total; var $author; var $paiementid; // Type de paiement. Stocké dans fk_paiement // de llx_paiement qui est lié aux types de @@ -53,13 +55,12 @@ class Paiement var $db; - /** - * \brief Constructeur de la classe - * \param DB handler accès base de données - * \param soc_idp id societe ('' par defaut) - */ - function Paiement($DB, $soc_idp='') + /** + * \brief Constructeur de la classe + * \param DB handler accès base de données + */ + function Paiement($DB) { $this->db = $DB ; } @@ -109,41 +110,39 @@ class Paiement } } - /** - * \brief Création du paiement en base - * \param user object utilisateur qui crée - * \return int id du paiement crée, < 0 si erreur - */ - + /** + * \brief Création du paiement en base + * \param user object utilisateur qui crée + * \return int id du paiement crée, < 0 si erreur + */ function create($user) { - $sql_err = 0; + $error = 0; + + // Nettoyage parametres + $value = price2num($value); + $this->total = 0; + foreach ($this->amounts as $key => $value) + { + $val = round($value, 2); + $this->amounts[$key] = $val; + $this->total += $val; + } + $this->total = price2num($this->total); + $this->db->begin(); - $total = 0.0; - foreach ($this->amounts as $key => $value) - { - $val = $value; - $val = str_replace(' ','',$val); - $val = str_replace(',','.',$val); - $val = round($val, 2); - $val = str_replace(',','.',$val); - if (is_numeric($val)) - { - $total += $val; - } - $this->amounts[$key] = $val; - } - $total = str_replace(',','.',$total); - if ($total <> 0) /* On accepte les montants négatifs pour les rejets de prélèvement */ + if ($this->total <> 0) // On accepte les montants négatifs pour les rejets de prélèvement { $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiement (datec, datep, amount, fk_paiement, num_paiement, note, fk_user_creat)'; - $sql .= ' VALUES (now(), '.$this->datepaye.', \''.$total.'\', '.$this->paiementid.', \''.$this->num_paiement.'\', \''.$this->note.'\', '.$user->id.')'; + $sql .= ' VALUES (now(), '.$this->datepaye.', \''.$this->total.'\', '.$this->paiementid.', \''.$this->num_paiement.'\', \''.$this->note.'\', '.$user->id.')'; $resql = $this->db->query($sql); if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'paiement'); + + // Insere tableau des montants / factures foreach ($this->amounts as $key => $amount) { $facid = $key; @@ -154,7 +153,7 @@ class Paiement if (! $this->db->query($sql) ) { dolibarr_syslog('Paiement::Create Erreur INSERT dans paiement_facture '.$facid); - $sql_err++; + $error++; } } else @@ -162,18 +161,28 @@ class Paiement dolibarr_syslog('Paiement::Create Montant non numérique'); } } + + if (! $error) + { + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('PAYMENT_CUSTOMER_CREATE',$this,$user,$lang,$conf); + if ($result < 0) $error++; + // Fin appel triggers + } } else { dolibarr_syslog('Paiement::Create Erreur INSERT dans paiement'); - $sql_err++; + $error++; } } - if ( $total <> 0 && $sql_err == 0 ) // On accepte les montants négatifs + if ( $this->total <> 0 && $error == 0 ) // On accepte les montants négatifs { $this->db->commit(); - dolibarr_syslog('Paiement::Create Ok Total = '.$total); + dolibarr_syslog('Paiement::Create Ok Total = '.$this->total); return $this->id; } else
'.$langs->trans('Bill').''.$langs->trans('Company').''.$langs->trans('AmountTTC').''.$langs->trans('Status').''.$langs->trans('Bill').''.$langs->trans('Status').''.$langs->trans('Company').''.$langs->trans('AmountTTC').'
'.img_object($langs->trans('ShowBill'),'bill').' '; print $objp->facnumber; print "'.$facturestatic->LibStatut($objp->paye,$objp->fk_statut,2,1).''.img_object($langs->trans('ShowCompany'),'company').' '.$objp->nom.''.price($objp->amount).''.$fac->LibStatut($objp->paye,$objp->fk_statut).'
'.img_object($langs->trans('ShowBill'),'bill').' '; print $objp->facnumber; print "'.$fac_static->LibStatut($objp->paye,$objp->fk_statut).''.$facturestatic->LibStatut($objp->paye,$objp->fk_statut,2,1).''.img_object($langs->trans('ShowCompany'),'company').' '.$objp->nom.''.price($objp->amount).'