From 60ff4318d8e7335999ee13749e0e3609499d2a11 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 25 May 2011 05:16:52 +0000 Subject: [PATCH] Works on paypal module Fix: replace ref_ext by ref_int --- htdocs/commande/class/commande.class.php | 4 ++-- htdocs/paypal/ajaxtransaction.php | 4 ++-- htdocs/paypal/transaction.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 65ca615ad25..7ef56650cc3 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -595,7 +595,7 @@ class Commande extends CommonObject $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande ("; - $sql.= " ref, fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note, note_public, ref_client, ref_ext"; + $sql.= " ref, fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note, note_public, ref_client, ref_int"; $sql.= ", model_pdf, fk_cond_reglement, fk_mode_reglement, fk_availability, fk_demand_reason, date_livraison, fk_adresse_livraison"; $sql.= ", remise_absolue, remise_percent"; $sql.= ", entity"; @@ -606,7 +606,7 @@ class Commande extends CommonObject $sql.= ", '".$this->db->escape($this->note)."'"; $sql.= ", '".$this->db->escape($this->note_public)."'"; $sql.= ", '".$this->db->escape($this->ref_client)."'"; - $sql.= ", ".($this->ref_ext?"'".$this->db->escape($this->ref_ext)."'":"null"); + $sql.= ", ".($this->ref_int?"'".$this->db->escape($this->ref_int)."'":"null"); $sql.= ", '".$this->modelpdf."'"; $sql.= ", ".($this->cond_reglement_id>0?"'".$this->cond_reglement_id."'":"null"); $sql.= ", ".($this->mode_reglement_id>0?"'".$this->mode_reglement_id."'":"null"); diff --git a/htdocs/paypal/ajaxtransaction.php b/htdocs/paypal/ajaxtransaction.php index 4572808b5cd..8852c5b9c3d 100644 --- a/htdocs/paypal/ajaxtransaction.php +++ b/htdocs/paypal/ajaxtransaction.php @@ -212,8 +212,8 @@ if (isset($_GET['action']) && ! empty($_GET['action']) && isset($_GET['transacti { $product_type=($product->product_type?$product->product_type:0); - if ($subelement == 'commande') $fields = array($object_id,$product->description,'',1,$product->tva_tx,$product->localtax1_tx,$product->localtax2_tx,$product->id,0,0,0,$product->price_base_type,$shipamount,'','',$product_type); - if ($subelement == 'facture') $fields = array($object_id,$product->description,'',1,$product->tva_tx,$product->localtax1_tx,$product->localtax2_tx,$product->id,0,'','',0,0,0,$product->price_base_type,$shipamount,$product_type); + if ($subelement == 'commande') $fields = array($object_id,$product->description,$shipamount,1,$product->tva_tx,$product->localtax1_tx,$product->localtax2_tx,$product->id,0,0,0,$product->price_base_type,$shipamount,'','',$product_type); + if ($subelement == 'facture') $fields = array($object_id,$product->description,$shipamount,1,$product->tva_tx,$product->localtax1_tx,$product->localtax2_tx,$product->id,0,'','',0,0,0,$product->price_base_type,$shipamount,$product_type); $result = $object->addline($fields[0],$fields[1],$fields[2],$fields[3],$fields[4],$fields[5],$fields[6],$fields[7],$fields[8],$fields[9],$fields[10],$fields[11],$fields[12],$fields[13],$fields[14],$fields[15],$fields[16]); diff --git a/htdocs/paypal/transaction.php b/htdocs/paypal/transaction.php index 268502e618f..83624496354 100644 --- a/htdocs/paypal/transaction.php +++ b/htdocs/paypal/transaction.php @@ -191,7 +191,7 @@ if (empty($conf->global->PAYPAL_API_USER) || empty($conf->global->PAYPAL_API_PAS } else { $.jnotify("trans('PleaseBePatient'); ?>", 500); $( "div #paypal-details" ).dialog( "close" ); - //location.href=value; + location.href=value; } }); });