瀏覽代碼

Merge branch 'dev'

prodstable
Guillaume Bourgeois 4 年之前
父節點
當前提交
35b52a43f9
共有 4 個文件被更改,包括 26 次插入1 次删除
  1. +2
    -0
      backend/controllers/OrderController.php
  2. +18
    -0
      common/models/Order.php
  3. +2
    -0
      common/models/Subscription.php
  4. +4
    -1
      producer/controllers/OrderController.php

+ 2
- 0
backend/controllers/OrderController.php 查看文件

@@ -875,6 +875,8 @@ class OrderController extends BackendController
$order->processCredit();
}

$order->setTillerSynchronization() ;

// lien utilisateur / point de vente
if ($idUser && $pointSale) {
$pointSale->linkUser($idUser);

+ 18
- 0
common/models/Order.php 查看文件

@@ -500,6 +500,24 @@ class Order extends ActiveRecordCommon
}
}

public function setTillerSynchronization()
{
$order = Order::searchOne(['id' => $this->id]);

$paymentStatus = $order->getPaymentStatus();

if ($paymentStatus == self::PAYMENT_PAID) {
$order->tiller_synchronization = 1 ;
}
else {
$order->tiller_synchronization = 0 ;
}

$order->save() ;

return $order ;
}

/**
* Retourne le statut de paiement de la commande (payée, surplus, ou impayée).
*

+ 2
- 0
common/models/Subscription.php 查看文件

@@ -218,6 +218,8 @@ class Subscription extends ActiveRecordCommon
}
}

$order->tiller_synchronization = $order->auto_payment ;

$userPointSale = UserPointSale::searchOne([
'id_point_sale' => $this->id_point_sale,
'id_user' => $this->id_user

+ 4
- 1
producer/controllers/OrderController.php 查看文件

@@ -393,9 +393,12 @@ class OrderController extends ProducerBaseController
User::getCurrentId()
);
}
}else{
}
else{
$order->changeOrderStatus('waiting-paiement-on-delivery', 'user');
}

$order->setTillerSynchronization() ;
}



Loading…
取消
儲存