diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index a29467df0b7..1d9d7b34ebd 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -17,15 +17,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \file htdocs/compta/bank/ligne.php \ingroup compta - \brief Page �dition d'une �criture bancaire - \version $Revision$ + \brief Page edition d'une ecriture bancaire + \version $Id$ */ require("./pre.inc.php"); @@ -35,6 +33,7 @@ if (! $user->rights->banque->lire && ! $user->rights->banque->consolidate) $langs->load("banks"); $langs->load("bills"); +$langs->load("categories"); if ($conf->adherent->enabled) $langs->load("members"); $rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"]; @@ -218,7 +217,7 @@ if ($result) // Confirmations if ($_GET["action"] == 'delete_categ') { - $html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&cat1=".$_GET["fk_categ"]."&orig_account=".$orig_account,"Supprimer dans la cat�gorie","Etes-vous s�r de vouloir supprimer le classement dans la cat�gorie ?","confirm_delete_categ"); + $html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&cat1=".$_GET["fk_categ"]."&orig_account=".$orig_account,$langs->trans("RemoveFromCategory"),$langs->trans("RemoveFromCategoryConfirm"),"confirm_delete_categ"); print '
'; } @@ -233,7 +232,7 @@ if ($result) $links=$acct->get_url($rowid); - // Tableau sur 4 colonne si d�ja rapproch�, sinon sur 5 colonnes + // Tableau sur 4 colonne si deja rapproche, sinon sur 5 colonnes // Author print ''.$langs->trans("Author").""; diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 74aefb39313..f71ab68c13b 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -14,15 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \file htdocs/compta/bank/treso.php \ingroup banque \brief Page de détail du budget de trésorerie - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 3d259cbffb9..a40ea11da25 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1213,6 +1213,7 @@ if ($_GET['action'] == 'create') $mode_reglement_id = $soc->mod_reglement; $remise_percent = $soc->remise_client; $remise_absolue = 0; + $dateinvoice=$contrat->date_contrat; } else { @@ -1221,6 +1222,7 @@ if ($_GET['action'] == 'create') $mode_reglement_id = $soc->mode_reglement; $remise_percent = $soc->remise_client; $remise_absolue = 0; + $dateinvoice=mktime(); } $absolute_discount=$soc->getAvailableDiscounts(); @@ -1353,7 +1355,7 @@ if ($_GET['action'] == 'create') // Date facture print ''.$langs->trans('Date').''; - $html->select_date('','','','','',"add"); + $html->select_date($dateinvoice,'','','','',"add"); print ''; // Conditions de règlement diff --git a/htdocs/contrat/contrat.class.php b/htdocs/contrat/contrat.class.php index 0ddbe2207da..982deb4d889 100644 --- a/htdocs/contrat/contrat.class.php +++ b/htdocs/contrat/contrat.class.php @@ -15,16 +15,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/contrat/contrat.class.php \ingroup contrat \brief Fichier de la classe des contrats - \version $Revision$ + \version $Id$ */ require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php"); @@ -36,7 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/price.lib.php"); \class Contrat \brief Classe permettant la gestion des contrats */ - class Contrat extends CommonObject { var $db; @@ -54,7 +50,10 @@ class Contrat extends CommonObject var $user_cloture; var $date_creation; var $date_validation; + + var $date_contrat; var $date_cloture; + var $commercial_signature_id; var $commercial_suivi_id; diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index c8885867f1a..8b48de8f3ee 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -2273,42 +2273,42 @@ class Facture extends CommonObject * Si facture brouillon et provisoire -> oui * \return int <0 si ko, 0=non, 1=oui */ - function is_erasable() - { - global $conf; + function is_erasable() + { + global $conf; - // on vérifie si la facture est en numérotation provisoire - $facref = substr($this->ref, 1, 4); + // on vérifie si la facture est en numérotation provisoire + $facref = substr($this->ref, 1, 4); - // Si facture non brouillon et non provisoire - if ($facref != 'PROV' && ! $conf->comptaexpert->enabled && $conf->global->FACTURE_ENABLE_EDITDELETE) - { - // On ne peut supprimer que la dernière facture validée - // pour ne pas avoir de trou dans la numérotation - $sql = "SELECT MAX(facnumber)"; - $sql.= " FROM ".MAIN_DB_PREFIX."facture"; + // Si facture non brouillon et non provisoire + if ($facref != 'PROV' && $conf->global->FACTURE_ENABLE_EDITDELETE) + { + // On ne peut supprimer que la dernière facture validée + // pour ne pas avoir de trou dans la numérotation + $sql = "SELECT MAX(facnumber)"; + $sql.= " FROM ".MAIN_DB_PREFIX."facture"; - $resql=$this->db->query($sql); - if ($resql) - { - $maxfacnumber = $this->db->fetch_row($resql); - } + $resql=$this->db->query($sql); + if ($resql) + { + $maxfacnumber = $this->db->fetch_row($resql); + } - $ventilExportCompta = $this->getVentilExportCompta(); + $ventilExportCompta = $this->getVentilExportCompta(); - // Si derniere facture et si non ventilée, on peut supprimer - if ($maxfacnumber[0] == $this->ref && $ventilExportCompta == 0) - { - return 1; - } - } - else if ($this->statut == 0 && $facref == 'PROV') // Si facture brouillon et provisoire - { - return 1; - } + // Si derniere facture et si non ventilée, on peut supprimer + if ($maxfacnumber[0] == $this->ref && $ventilExportCompta == 0) + { + return 1; + } + } + else if ($this->statut == 0 && $facref == 'PROV') // Si facture brouillon et provisoire + { + return 1; + } - return 0; - } + return 0; + } /** diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang index b9a63510afb..e1022240ff3 100644 --- a/htdocs/langs/en_US/categories.lang +++ b/htdocs/langs/en_US/categories.lang @@ -58,6 +58,8 @@ ContentsNotVisibleByAllShort=Contents not visible by all CategoriesTree=Categories tree DeleteCategory=Delete category ConfirmDeleteCategory=Are you sure you want to delete this category ? +RemoveFromCategory=Remove link with categorie +RemoveFromCategoryConfirm=Are you sure you want to remove link between the transaction and the category ? NoCategoriesDefined=No category defined SuppliersCategoryShort=Suppliers category CustomersCategoryShort=Customers category diff --git a/htdocs/langs/fr_FR/categories.lang b/htdocs/langs/fr_FR/categories.lang index ac019da69d4..69580eba22b 100644 --- a/htdocs/langs/fr_FR/categories.lang +++ b/htdocs/langs/fr_FR/categories.lang @@ -57,7 +57,9 @@ ContentsVisibleByAllShort=Contenu visible par tous ContentsNotVisibleByAllShort=Contenu non visible par tous CategoriesTree=Arbre des catégories DeleteCategory=Supprimer categorie -ConfirmDeleteCategory=Etes vous sur de vouloir supprimer cette catégorie ? +ConfirmDeleteCategory=Etes-vous sur de vouloir supprimer cette catégorie ? +RemoveFromCategory=Supprimer lien avec catégorie +RemoveFromCategoryConfirm=Etes-vous sur de vouloir supprimer le lien entre la transaction et la categorie ? NoCategoriesDefined=Aucune catégorie définie SuppliersCategoryShort=Catégorie fournisseurs CustomersCategoryShort=Catégorie clients diff --git a/htdocs/lib/bank.lib.php b/htdocs/lib/bank.lib.php index 43b629562bf..ecf19db2558 100644 --- a/htdocs/lib/bank.lib.php +++ b/htdocs/lib/bank.lib.php @@ -15,16 +15,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * or see http://www.gnu.org/ - * - * $Id$ - * $Source$ */ /** \file htdocs/lib/bank.lib.php \brief Ensemble de fonctions de base pour le module banque \ingroup banque - \version $Revision$ + \version $Id$ Ensemble de fonctions de base de dolibarr sous forme d'include */