diff --git a/app/Classes/Modules/PerfexCRM/Services/CreatesPerfexCRMInvoice.php b/app/Classes/Modules/PerfexCRM/Services/CreatesPerfexCRMInvoice.php index b595a86f..ba0c2755 100644 --- a/app/Classes/Modules/PerfexCRM/Services/CreatesPerfexCRMInvoice.php +++ b/app/Classes/Modules/PerfexCRM/Services/CreatesPerfexCRMInvoice.php @@ -16,14 +16,17 @@ class CreatesPerfexCRMInvoice */ public function execute(InvoicePerfexCRMObject $invoicePerfexCRMObject) { try{ + $subtotal = floor($invoicePerfexCRMObject->getSubTotal() * 100) / 100; + $total = floor($invoicePerfexCRMObject->getTotal() * 100) / 100; + $data = [ 'clientid' => $invoicePerfexCRMObject->getClientId(), 'number' => $invoicePerfexCRMObject->getNumber(), 'date' => $invoicePerfexCRMObject->getDate(), 'duedate' => $invoicePerfexCRMObject->getDueDate(), 'currency' => $invoicePerfexCRMObject->getCurrency(), - 'subtotal' => number_format($invoicePerfexCRMObject->getSubTotal(), 2, '.', ''), - 'total' => number_format($invoicePerfexCRMObject->getTotal(), 2, '.', ''), + 'subtotal' => number_format($subtotal, 2, '.', ''), + 'total' => number_format($total, 2, '.', ''), 'billing_street' => $invoicePerfexCRMObject->getBillingStreet(), 'project_id' => $invoicePerfexCRMObject->getProjectId(), 'allowed_payment_modes[0]' => 1,