ソースを参照

Correctif DolibarrProducerUtils

develop
Guillaume 3ヶ月前
コミット
a784e88a35
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;
}
}
}


読み込み中…
キャンセル
保存