Selaa lähdekoodia

Merge branch 'develop'

master
Guillaume Bourgeois 2 kuukautta sitten
vanhempi
commit
6b9a5081b2
2 muutettua tiedostoa jossa 8 lisäystä ja 6 poistoa
  1. +2
    -2
      common/components/Tiller/TillerClientV2.php
  2. +6
    -4
      domain/Producer/Producer/DolibarrProducerUtils.php

+ 2
- 2
common/components/Tiller/TillerClientV2.php Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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…
Peruuta
Tallenna