Jump to content

Problemas con decimales en SQL de ventas


pablobuendiaelvira

Recommended Posts

Hola, tengo un problema a la hora de realizar una consulta SQL sobre las ventas que tengo en prestashop.

Cuando hago mi SQL me muestra el precio de venta, el precio de compra, el total de la venta con un formato que no entiendo porque.

¿Como puedo solucionarlo?

Adjunto una imagen para explicarlo mejor

 

1.jpg

 

Debería de ser 77€, 8€ y 11€ la primera fila y así todas.

Edited by pablobuendiaelvira (see edit history)
Link to comment
Share on other sites

Hola Joseantgv, gracias por tu ayuda,

Esta es la query: "SELECT ps_product_lang.name, ps_supplier.name, ps_order_detail.product_quantity, ps_orders.total_paid, ps_product.wholesale_price, ps_product.price, ps_orders.date_add, ps_localidades.codigoLocalidadAsesmed, ps_localidades.codigoProvinciaAsesmed FROM ps_orders, ps_supplier, ps_order_detail, ps_localidades, ps_product, ps_product_lang, ps_cart_product WHERE ps_orders.total_paid != 0 AND ps_orders.invoice_number != 0 AND ps_orders.id_cart = ps_cart_product.id_cart AND ps_cart_product.id_product = ps_product.id_product AND ps_product.id_localidad = ps_localidades.id_localidad AND ps_product.id_product = ps_product_lang.id_product AND ps_product_lang.id_lang = 4 AND ps_orders.id_order = ps_order_detail.id_order AND ps_product.id_supplier = ps_supplier.id_supplier"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...