Bläddra i källkod

Merge branch 'develop'

master
Guillaume 3 månader sedan
förälder
incheckning
cf6c34f56a
2 ändrade filer med 8 tillägg och 6 borttagningar
  1. +2
    -2
      common/components/Tiller/TillerClientV2.php
  2. +6
    -4
      domain/Producer/Producer/DolibarrProducerUtils.php

+ 2
- 2
common/components/Tiller/TillerClientV2.php Visa fil

@@ -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 Visa fil

@@ -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;
}
}
}


Laddar…
Avbryt
Spara