|
@@ -6,17 +6,12 @@ class sync_order_dp extends sync_order
|
|
|
public static function dp_check_sync(&$o, &$d_data)
|
|
|
{
|
|
|
// @todo modifier avec P >= 1.7.8
|
|
|
- // Si produit maître avec déclinaisons, on stoppe la synchro pour pas foutre le border
|
|
|
|
|
|
// Uniquement resynchro ! On n'envoie pas les commandes créées sur DOli vers Presta
|
|
|
// @todo : Du moins tant qu'on a pas réglé le cas des produits libres
|
|
|
if (empty($o['p_oid']))
|
|
|
return false;
|
|
|
|
|
|
- // Si noté pas synchro
|
|
|
- if (empty($d_data['product_extrafields']) || empty($d_data['product_extrafields']['sync']))
|
|
|
- return false;
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -102,15 +97,17 @@ public function dp_map_update(&$o, &$d_data, &$p_data=[])
|
|
|
'orders' => [
|
|
|
//'reference' => substr($d_data['commande']['ref'], 0, 9),
|
|
|
|
|
|
- 'id_customer' => static::_dp_map_fk_customer($d_data),
|
|
|
- 'id_address_delivery' => static::_dp_map_fk_address_delivery($d_data),
|
|
|
- 'id_address_invoice' => static::_dp_map_fk_address_invoice($d_data),
|
|
|
+ //'id_customer' => static::_dp_map_fk_customer($d_data),
|
|
|
+ //'id_address_delivery' => static::_dp_map_fk_address_delivery($d_data),
|
|
|
+ //'id_address_invoice' => static::_dp_map_fk_address_invoice($d_data),
|
|
|
|
|
|
- 'total_paid' => $d_data['commande']['total_ttc'],
|
|
|
- 'total_paid_tax_incl' => $d_data['commande']['total_ttc'],
|
|
|
- 'total_paid_tax_excl' => $d_data['commande']['total_ht'],
|
|
|
+ //'total_paid' => $d_data['commande']['total_ttc'],
|
|
|
+ //'total_paid_tax_incl' => $d_data['commande']['total_ttc'],
|
|
|
+ //'total_paid_tax_excl' => $d_data['commande']['total_ht'],
|
|
|
|
|
|
'date_upd' => max($d_data['commande']['tms'], !empty($p_data['orders']['date_upd']) ?$p_data['orders']['date_upd'] :'0000-00-00 00:00:00'),
|
|
|
+
|
|
|
+ 'note' => strip_tags($d_data['commande']['note_private']),
|
|
|
],
|
|
|
];
|
|
|
|