瀏覽代碼

Divers

develop
Guillaume Bourgeois 2 月之前
父節點
當前提交
474aee5212
共有 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…
取消
儲存