Jump to content
jd440

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?

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More