Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
- Prend en compte la date de modification du produit parent si elle e…
Browse files Browse the repository at this point in the history
…st plus récente que celle de la variation lors d'une synchronisation du site vers dolibarr
  • Loading branch information
kkhelifa-opendsi committed Mar 21, 2023
1 parent 082ea31 commit 0be1c64
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ChangeLog

## 4.1.42.0
- Prend en compte la date de modification du produit parent si elle est plus récente que celle de la variation lors d'une synchronisation du site vers dolibarr

## 4.1.41.0
- Correction de Mise à jour des stocks de dolibarr vers WooCommerce avec le support "Stock Locations for WooCommerce" activé (lorsque tout les entrepots ne sont pas forcement associés)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,12 @@ public function convertProductDataIntoProcessedData($remote_data, $parent_remote
}

$last_update_product = $this->getDateTimeFromGMTDateTime(!empty($remote_data['date_modified_gmt']) ? $remote_data['date_modified_gmt'] : $remote_data['date_created_gmt']);
if (isset($parent_remote_data)) {
$parent_last_update_product = $this->getDateTimeFromGMTDateTime(!empty($parent_remote_data['date_modified_gmt']) ? $parent_remote_data['date_modified_gmt'] : $parent_remote_data['date_created_gmt']);
if ($parent_last_update_product > $last_update_product) {
$last_update_product = $parent_last_update_product;
}
}
$last_update = $last_update_product->format('Y-m-d H:i:s');

$price = $productSynchPrice == 'selling' ? $remote_data['price'] : $remote_data['regular_price'];
Expand Down
2 changes: 1 addition & 1 deletion core/modules/modECommerceNg.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function __construct($db)
$this->editor_url = 'http://www.open-dsi.fr';

// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = '4.1.41';
$this->version = '4.1.42';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
Expand Down

0 comments on commit 0be1c64

Please sign in to comment.