Fix: Le chp date fin adhsion n'tait pas mis a jour par la fiche adhsion en dition

This commit is contained in:
Laurent Destailleur 2008-01-10 19:24:16 +00:00
parent 31b6ec783f
commit b213e0fb09
3 changed files with 6 additions and 3 deletions

View File

@ -465,7 +465,7 @@ class Adherent extends CommonObject
}
/**
\brief Fonction qui met e jour l'adherent (sauf mot de passe)
\brief Fonction qui met a jour l'adherent (sauf mot de passe)
\param user Utilisateur qui realise la mise a jour
\param notrigger 1=desactive le trigger UPDATE (quand appele par creation)
\param nosyncuser Do not synchronize linked user
@ -731,7 +731,7 @@ class Adherent extends CommonObject
* \param nosyncuser Do not synchronize linked user
* \return string If OK return clear password, 0 if no change, < 0 if error
*/
function password($user, $password='', $isencrypted=0, $notrigger=0, $nosyncuser=0)
function setPassword($user, $password='', $isencrypted=0, $notrigger=0, $nosyncuser=0)
{
global $conf, $langs;

View File

@ -158,6 +158,7 @@ class Cotisation extends CommonObject
$sql .= " note=".($this->note ? "'".addslashes($this->note)."'" : 'null').",";
$sql .= " cotisation = '".price2num($this->amount)."',";
$sql .= " dateadh='".$this->db->idate($this->dateh)."',";
$sql .= " datef='".$this->db->idate($this->datef)."',";
$sql .= " datec='".$this->db->idate($this->datec)."'";
$sql .= " WHERE rowid = ".$this->id;

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -91,7 +91,9 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update
{
// Modifie valeures
$subscription->dateh=dolibarr_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']);
$subscription->datef=dolibarr_mktime($_POST['datesubendhour'], $_POST['datesubendmin'], 0, $_POST['datesubendmonth'], $_POST['datesubendday'], $_POST['datesubendyear']);
$subscription->amount=$_POST["amount"];
//print 'datef='.$subscription->datef.' '.$_POST['datesubendday'];
$result=$subscription->update($user);
if ($result >= 0 && ! sizeof($subscription->errors))