Fix: Date paiement de tva non sauvé
This commit is contained in:
parent
6b8c6d9428
commit
55e8189b23
@ -17,7 +17,6 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -343,10 +342,17 @@ class PaiementCharge
|
|||||||
function create($user)
|
function create($user)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$this->db->begin();
|
|
||||||
|
|
||||||
|
// Validation parametres
|
||||||
|
if (! $this->datepaye)
|
||||||
|
{
|
||||||
|
$this->error='ErrorBadValueForParameters';
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
$total=0;
|
$total=0;
|
||||||
foreach ($this->amounts as $key => $value)
|
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 = "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.= " 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)";
|
$sql.= price2num($total).", $this->paiementtype, '$this->num_paiement', '".addslashes($this->note)."', $user->id)";
|
||||||
|
|
||||||
dolibarr_syslog("PaiementCharge::create sql=".$sql);
|
dolibarr_syslog("PaiementCharge::create sql=".$sql);
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -57,7 +56,6 @@ if ($_POST["action"] == 'add_paiement')
|
|||||||
if ($_POST["paiementtype"] > 0)
|
if ($_POST["paiementtype"] > 0)
|
||||||
{
|
{
|
||||||
$datepaye = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
$datepaye = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
||||||
//print "x".dolibarr_print_date($datepaye,'dayhour');
|
|
||||||
|
|
||||||
$paiement_id = 0;
|
$paiement_id = 0;
|
||||||
$amounts = array();
|
$amounts = array();
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user