Przeglądaj źródła

[Administration] Facture 2 Four de l'Ariette : facture non réglée malgré le réglement #1268

feature/souke
Guillaume Bourgeois 1 rok temu
rodzic
commit
1e6786f05a
2 zmienionych plików z 3 dodań i 2 usunięć
  1. +1
    -1
      backend/controllers/DocumentController.php
  2. +2
    -1
      common/logic/Document/Invoice/Service/InvoiceSolver.php

+ 1
- 1
backend/controllers/DocumentController.php Wyświetl plik

@@ -179,7 +179,7 @@ class DocumentController extends BackendController
if($documentManager->isDocumentInvoice($document) && $documentManager->isStatusValid($document)) {
$payment = $paymentManager->instanciatePayment(
Payment::TYPE_PAYMENT,
number_format($documentManager->getAmountWithTax($document), 3),
number_format($documentManager->getAmountWithTax($document, Order::INVOICE_AMOUNT_TOTAL), 2),
$this->getProducerCurrent(),
null,
null,

+ 2
- 1
common/logic/Document/Invoice/Service/InvoiceSolver.php Wyświetl plik

@@ -5,6 +5,7 @@ namespace common\logic\Document\Invoice\Service;
use common\helpers\Price;
use common\logic\Document\Document\Service\DocumentSolver;
use common\logic\Document\Invoice\Model\Invoice;
use common\logic\Order\Order\Model\Order;

class InvoiceSolver extends DocumentSolver
{
@@ -21,6 +22,6 @@ class InvoiceSolver extends DocumentSolver

public function isInvoicePaid(Invoice $invoice): bool
{
return $this->getInvoiceAmountPaid($invoice) >= Price::numberTwoDecimals($this->getAmountWithTax($invoice));
return $this->getInvoiceAmountPaid($invoice) >= Price::numberTwoDecimals($this->getAmountWithTax($invoice, Order::INVOICE_AMOUNT_TOTAL));
}
}

Ładowanie…
Anuluj
Zapisz