Fix: Date paiement de tva non sauv

This commit is contained in:
Laurent Destailleur 2007-10-29 19:56:23 +00:00
parent 6b8c6d9428
commit 55e8189b23
3 changed files with 10 additions and 7 deletions

View File

@ -17,7 +17,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**
@ -343,10 +342,17 @@ class PaiementCharge
function create($user)
{
global $conf;
$error = 0;
$this->db->begin();
// Validation parametres
if (! $this->datepaye)
{
$this->error='ErrorBadValueForParameters';
return -1;
}
$this->db->begin();
$total=0;
foreach ($this->amounts as $key => $value)
{
@ -359,7 +365,7 @@ class PaiementCharge
{
$sql = "INSERT INTO ".MAIN_DB_PREFIX."paiementcharge (fk_charge, datec, datep, amount, fk_typepaiement, num_paiement, note, fk_user_creat)";
$sql.= " VALUES ($this->chid, now(), ";
$sql.= $this->db->idate($this->date_ech).", ";
$sql.= $this->db->idate($this->datepaye).", ";
$sql.= price2num($total).", $this->paiementtype, '$this->num_paiement', '".addslashes($this->note)."', $user->id)";
dolibarr_syslog("PaiementCharge::create sql=".$sql);

View File

@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**
@ -57,7 +56,6 @@ if ($_POST["action"] == 'add_paiement')
if ($_POST["paiementtype"] > 0)
{
$datepaye = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
//print "x".dolibarr_print_date($datepaye,'dayhour');
$paiement_id = 0;
$amounts = array();

View File

@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**