瀏覽代碼

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

feature/souke
Guillaume Bourgeois 1 年之前
父節點
當前提交
1e6786f05a
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. +1
    -1
      backend/controllers/DocumentController.php
  2. +2
    -1
      common/logic/Document/Invoice/Service/InvoiceSolver.php

+ 1
- 1
backend/controllers/DocumentController.php 查看文件

@@ -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 查看文件

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

Loading…
取消
儲存