Browse Source

[Backend] Problème synchronisation Tiller #238

refactoring
Guillaume 2 years ago
parent
commit
2fc578b4c9
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      backend/controllers/DistributionController.php
  2. +1
    -1
      common/helpers/Tiller.php

+ 1
- 1
backend/controllers/DistributionController.php View File

] ]
]); ]);


$order->tiller_external_id = $returnTiller->externalId;
$order->tiller_external_id = $returnTiller->id;
$order->save(); $order->save();


$return[] = $returnTiller; $return[] = $returnTiller;

+ 1
- 1
common/helpers/Tiller.php View File

$ordersOpendistribSynchro[$orderOpendistrib->id] = false; $ordersOpendistribSynchro[$orderOpendistrib->id] = false;
if(isset($ordersTiller->orders)) { if(isset($ordersTiller->orders)) {
foreach ($ordersTiller->orders as $orderTiller) { foreach ($ordersTiller->orders as $orderTiller) {
if ($orderOpendistrib->tiller_external_id == $orderTiller->externalId
if ($orderOpendistrib->tiller_external_id == $orderTiller->id
&& (int) round($orderOpendistrib->getAmountWithTax(Order::AMOUNT_TOTAL) * 100) == (int) $orderTiller->currentBill) { && (int) round($orderOpendistrib->getAmountWithTax(Order::AMOUNT_TOTAL) * 100) == (int) $orderTiller->currentBill) {


$ordersOpendistribSynchro[$orderOpendistrib->id] = true; $ordersOpendistribSynchro[$orderOpendistrib->id] = true;

Loading…
Cancel
Save