Jump to content

Maj 1.6.0.9 - > 1.6.1.4 ancien avoir in-éditable


Recommended Posts

Bonjour.

 

Suite à une Maj 1.6.0.9 - > 1.6.1.4 il m'est impossible d'éditer les anciens Avoirs? (pas de souci sur les nouveaux).

 

En regardant de plus près le système d'avoir à changer lors de la 1.6.1.0

ALTER TABLE `PREFIX_order_slip` ADD `total_products_tax_excl` DECIMAL(20, 6) NULL AFTER `id_order`, ADD `total_products_tax_incl` DECIMAL(20, 6) NULL AFTER `total_products_tax_excl`,ADD `total_shipping_tax_excl` DECIMAL(20, 6) NULL AFTER `total_products_tax_incl`, ADD `total_shipping_tax_incl` DECIMAL(20, 6) NULL AFTER `total_shipping_tax_excl`;
ALTER TABLE `PREFIX_order_slip_detail` ADD `unit_price_tax_excl` DECIMAL(20, 6) NULL AFTER `product_quantity`, ADD `unit_price_tax_incl` DECIMAL(20, 6) NULL AFTER  `unit_price_tax_excl`, ADD `total_price_tax_excl` DECIMAL(20, 6) NULL AFTER `unit_price_tax_incl`, ADD `total_price_tax_incl` DECIMAL(20, 6) NULL AFTER `total_price_tax_excl`;

Mais il semble que les anciens avoir ne sont pas mis à jour?

Pour les anciens avoirs certains sont vide Du coup, impossible d'éditer les anciens Avoirs!

Champ vide:

ps_order_slip_detail
    - unit_price_tax_excl
    - unit_price_tax_incl
    - total_price_tax_excl
    - total_price_tax_incl
ps_order_slip
    - total_products_tax_excl
    - total_products_tax_incl
    - total_shipping_tax_excl
    - total_shipping_tax_incl

 

Est ce identique chez vous?

 

Auriez vous un correctifs?

Link to comment
Share on other sites

Si ca peux aider qqun

UPDATE `ps_order_slip_detail` osd, `ps_order_detail` od  SET osd.`unit_price_tax_excl` = od.`unit_price_tax_excl` WHERE osd.`unit_price_tax_excl` IS NULL AND osd.`id_order_detail` = od.`id_order_detail`;
UPDATE `ps_order_slip_detail` osd, `ps_order_detail` od  SET osd.`unit_price_tax_incl` = od.`unit_price_tax_incl` WHERE osd.`unit_price_tax_incl` IS NULL AND osd.`id_order_detail` = od.`id_order_detail`;
UPDATE `ps_order_slip_detail` SET `total_price_tax_incl` = `unit_price_tax_incl`*`product_quantity` WHERE `total_price_tax_incl` IS NULL;
UPDATE `ps_order_slip_detail` SET `total_price_tax_excl` = `unit_price_tax_excl`*`product_quantity` WHERE `total_price_tax_excl` IS NULL;


UPDATE `ps_order_slip` SET `total_shipping_tax_incl` = `shipping_cost_amount` WHERE `shipping_cost` = 1;
UPDATE `ps_order_slip` os, `ps_order_detail` od  SET os.`total_shipping_tax_excl` = od.`total_shipping_price_tax_excl` WHERE os.`shipping_cost` = 1 AND os.`id_order` = od.`id_order`;
UPDATE `ps_order_slip` os
    INNER JOIN (
      SELECT `id_order_slip`, SUM(`total_price_tax_incl`) as total
      FROM `ps_order_slip_detail`
      GROUP BY `id_order_slip`
    ) x ON os.`id_order_slip` = x.`id_order_slip`
SET os.`total_products_tax_incl` = x.total;

UPDATE `ps_order_slip` os
    INNER JOIN (
      SELECT `id_order_slip`, SUM(`total_price_tax_excl`) as total
      FROM `ps_order_slip_detail`
      GROUP BY `id_order_slip`
    ) x ON os.`id_order_slip` = x.`id_order_slip`
SET os.`total_products_tax_excl` = x.total;
Edited by jd440 (see edit history)
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...