소스 검색

Merge branch 'develop'

master
Guillaume 3 달 전
부모
커밋
cf6c34f56a
2개의 변경된 파일8개의 추가작업 그리고 6개의 파일을 삭제
  1. +2
    -2
      common/components/Tiller/TillerClientV2.php
  2. +6
    -4
      domain/Producer/Producer/DolibarrProducerUtils.php

+ 2
- 2
common/components/Tiller/TillerClientV2.php 파일 보기

@@ -87,11 +87,11 @@ class TillerClientV2 implements TillerClientInterface
'restaurant_token' => $this->restaurantToken,
], $params);

\Yii::$app->mailerService->sendAdmin('Log post order SumUp', 'contact', [
/*\Yii::$app->mailerService->sendAdmin('Log post order SumUp', 'contact', [
'name' => 'Souke',
'email' => 'contact@souke.fr',
'content' => json_encode($params)
]);
]);*/

return $this->curl->setPostParams($params)->post($this->urlApi . 'orders');
}

+ 6
- 4
domain/Producer/Producer/DolibarrProducerUtils.php 파일 보기

@@ -20,7 +20,7 @@ class DolibarrProducerUtils extends AbstractManager
$this->producerRepository = $this->loadService(ProducerRepository::class);
}

public function getDolibarrProducerInvoices(Producer $producer): array
public function getDolibarrProducerInvoices(Producer $producer)
{
$invoicesArray = [];
if($producer->dolibarr_socid) {
@@ -35,9 +35,11 @@ class DolibarrProducerUtils extends AbstractManager
$unpaidInvoicesArray = [];
$invoicesArray = $this->getDolibarrProducerInvoices($producer);

foreach($invoicesArray as $invoice) {
if(isset($invoice['remaintopay']) && $invoice['remaintopay'] > 0) {
$unpaidInvoicesArray[] = $invoice;
if($invoicesArray) {
foreach ($invoicesArray as $invoice) {
if (isset($invoice['remaintopay']) && $invoice['remaintopay'] > 0) {
$unpaidInvoicesArray[] = $invoice;
}
}
}


Loading…
취소
저장