From 868b0110aa00247c51dbb3d6715b53964af2b0c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 4 Apr 2006 00:42:21 +0000 Subject: [PATCH] =?UTF-8?q?New:=20Gestion=20des=20avoirs=20=E0=20la=20sais?= =?UTF-8?q?ie=20des=20factures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/fiche.php | 8 ++++---- htdocs/facture.class.php | 36 ------------------------------------ 2 files changed, 4 insertions(+), 40 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index a56552b3fa0..a5e976c820a 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -350,18 +350,18 @@ if ($socidp > 0) // Remise permanente print ''; print '
'; - print $langs->trans("CustomerRelativeDiscount"); + print $langs->trans("CustomerRelativeDiscountShort"); print ''; print ''.img_edit($langs->trans("Modify")).''; print '
'; - print ''.$objsoc->remise_client." %"; + print ''.($objsoc->remise_client?$objsoc->remise_client.'%':$langs->trans("DiscountNone")).''; print ''; // Remise avoirs print ''; print ''; print '
'; - print $langs->trans("CustomerAbsoluteDiscount"); + print $langs->trans("CustomerAbsoluteDiscountShort"); print ''; print ''.img_edit($langs->trans("Modify")).''; print '
'; @@ -370,7 +370,7 @@ if ($socidp > 0) $amount_discount=$objsoc->getcurrentDiscount(); if ($amount_discount < 0) dolibarr_print_error($db,$societe->error); if ($amount_discount > 0) print $amount_discount.' '.$langs->trans("Currency".$conf->monnaie); - else print $langs->trans("None"); + else print $langs->trans("DiscountNone"); print ''; print ''; diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index 7c71b055dc8..438ec2aaf65 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -281,42 +281,6 @@ class Facture } - /* - * \todo Plus utilisé. A reprendre dans validation facture - */ - function _affect_remise_exceptionnelle() - { - $error = 0; - - $this->db->begin(); - - $sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except'; - $sql .= ' SET fk_facture = '.$this->id.','; - $sql .= " amount_ht = '".price2num($remise)."'"; - $sql .= ' WHERE rowid ='.$this->remise_exceptionnelle[0]; - $sql .= ' AND fk_soc ='. $this->socidp; - - if (! $this->db->query( $sql)) - { - $error++; - } - - if ($reliquat > 0) - { - } - - if (! $error) - { - $this->db->commit(); - } - else - { - $this->db->rollback(); - } - - return $error; - } - /** * \brief Recupére l'objet facture et ses lignes de factures * \param rowid id de la facture a récupérer