diff --git a/htdocs/boutique/client/fiche.php b/htdocs/boutique/client/fiche.php
index 1ae325b7553..6b27705dfea 100644
--- a/htdocs/boutique/client/fiche.php
+++ b/htdocs/boutique/client/fiche.php
@@ -68,7 +68,7 @@ if ($_GET['id'])
/*
* Commandes
*/
- $sql = "SELECT o.orders_id, o.customers_id,".$dbosc->pdate("date_purchased")." as date_purchased, t.value as total";
+ $sql = "SELECT o.orders_id, o.customers_id, date_purchased, t.value as total";
$sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o, ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t";
$sql .= " WHERE o.customers_id = " . $_GET['id'];
$sql .= " AND o.orders_id = t.orders_id AND t.class = 'ot_total'";
@@ -90,7 +90,7 @@ if ($_GET['id'])
print '
';
- print dol_print_date($objp->date_purchased,'dayhour')."\n";
+ print dol_print_date($dbosc->jdate($objp->date_purchased),'dayhour')."\n";
print $objp->total . " | \n";
print "\n";
$i++;
diff --git a/htdocs/boutique/commande/class/boutiquecommande.class.php b/htdocs/boutique/commande/class/boutiquecommande.class.php
index 8ee6c1194ed..91f4090c1b6 100644
--- a/htdocs/boutique/commande/class/boutiquecommande.class.php
+++ b/htdocs/boutique/commande/class/boutiquecommande.class.php
@@ -61,7 +61,7 @@ class BoutiqueCommande
{
global $conf;
- $sql = "SELECT orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified, ".$this->db->pdate("date_purchased") . " as date_purchased, orders_status, orders_date_finished, currency, currency_value";
+ $sql = "SELECT orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified, date_purchased, orders_status, orders_date_finished, currency, currency_value";
$sql.= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders";
$sql.= " WHERE orders_id = ".$id;
@@ -77,7 +77,7 @@ class BoutiqueCommande
$this->payment_method = stripslashes($array["payment_method"]);
- $this->date = dol_print_date($array["date_purchased"],'dayhour');
+ $this->date = $this->db->jdate($array["date_purchased"]);
$this->delivery_adr->name = stripslashes($array["delivery_name"]);
$this->delivery_adr->street = stripslashes($array["delivery_street_address"]);
diff --git a/htdocs/boutique/commande/index.php b/htdocs/boutique/commande/index.php
index 0c32c816212..428bc8069db 100644
--- a/htdocs/boutique/commande/index.php
+++ b/htdocs/boutique/commande/index.php
@@ -48,7 +48,7 @@ $offset = $limit * $page ;
print_barre_liste("Liste des commandes", $page, "commande.php");
- $sql = "SELECT o.orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified,".$dbosc->pdate("date_purchased")." as date_purchased, orders_status, orders_date_finished, currency, currency_value, t.value";
+ $sql = "SELECT o.orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified, date_purchased, orders_status, orders_date_finished, currency, currency_value, t.value";
$sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o, ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t";
$sql .= " WHERE o.orders_id = t.orders_id AND t.class = 'ot_total'";
@@ -75,7 +75,7 @@ if ( $dbosc->query($sql) )
print ' ';
print $objp->orders_id ." | ";
- print dol_print_date($objp->date_purchased,'dayhour').' | ';
+ print dol_print_date($dbosc->jdate($objp->date_purchased),'dayhour').'';
print ''.$objp->customers_name." | \n";
print ''.price($objp->value).' | ';
print "\n";
diff --git a/htdocs/boutique/promotion/index.php b/htdocs/boutique/promotion/index.php
index 14d93a945e1..23dca8e9baf 100644
--- a/htdocs/boutique/promotion/index.php
+++ b/htdocs/boutique/promotion/index.php
@@ -58,12 +58,12 @@ print_barre_liste("Liste des promotions", $page, "index.php", "",$sortfield, $so
$urladd = "&sortorder=$sortorder&sortfield=$sortfield";
-$sql = "SELECT pd.products_name, s.specials_new_products_price, p.products_price, p.products_model, s.status, p.products_id";
-$sql .= ",".$dbosc->pdate("expires_date")." as fin";
-$sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."specials as s,".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."products_description as pd,".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."products as p";
-$sql .= " WHERE s.products_id = pd.products_id AND pd.products_id = p.products_id AND pd.language_id = ".$conf->global->OSC_LANGUAGE_ID;
-$sql .= " ORDER BY $sortfield $sortorder ";
-$sql .= $dbosc->plimit( $limit ,$offset);
+$sql = "SELECT pd.products_name, s.specials_new_products_price, p.products_price, p.products_model, s.status, p.products_id,";
+$sql.= " expires_date as fin";
+$sql.= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."specials as s,".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."products_description as pd,".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."products as p";
+$sql.= " WHERE s.products_id = pd.products_id AND pd.products_id = p.products_id AND pd.language_id = ".$conf->global->OSC_LANGUAGE_ID;
+$sql.= " ORDER BY $sortfield $sortorder ";
+$sql.= $dbosc->plimit( $limit ,$offset);
$resql=$dbosc->query($sql);
if ($resql)
@@ -102,7 +102,7 @@ if ($resql)
print '
';
print ' | ';
}
- print "".dol_print_date($objp->fin,'day')." | ";
+ print "".dol_print_date($dbosc->jdate($objp->fin),'day')." | ";
print ''.price($objp->products_price)." | ";
print ''.price($objp->specials_new_products_price)." | ";
print "";