]> _ Git - bastide-resah.git/commitdiff
wip #6864 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 29 Apr 2024 16:31:31 +0000 (18:31 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 29 Apr 2024 16:31:31 +0000 (18:31 +0200)
app/Http/Controllers/FluidbookController.php

index f80ff64e2fd248a3519541a11d55bae9f258e223..e4bedb0ecc038b0e55119751e46114e9934d7e40 100644 (file)
@@ -108,7 +108,7 @@ class FluidbookController extends Controller
             $pvht = self::parseFloat($p['PV RESAH HT']);
             $ecotaxe = self::parseFloat($p['ECOTAXE']);
             $tht = ($pvht + $ecotaxe) * $i['quantity'];
-            $tva = $pvht * $i['quantity'] * 0.01 * self::parseFloat($p['TVA']);
+            $tva = $tht * 0.01 * self::parseFloat($p['TVA']);
             $total += $tht;
 
             $cumul_tva += $tva;
@@ -130,7 +130,7 @@ class FluidbookController extends Controller
         $details[] = 'TOTAL HT : ' . self::formatNumber($total) . "\n"
             . 'TVA : ' . self::formatNumber($cumul_tva) . "\n"
             . 'ECOTAXE : ' . self::formatNumber($cumul_ecotaxe) . "\n"
-            . 'TOTAL TTC : ' . self::formatNumber($total + $cumul_ecotaxe + $cumul_tva);
+            . 'TOTAL TTC : ' . self::formatNumber($total + $cumul_tva);
 
         /** @var Client $user */
         $user = auth()->guard('client')->user();
@@ -141,6 +141,8 @@ class FluidbookController extends Controller
         $order->total_ht = $total;
         $order->save();
 
+
+
         $user->notify(new ResahNotification(ResahNotification::QUOTE_REQUEST_SENT, $order));
         User::withoutGlobalScopes()->find(3)->notify(new ResahNotification(ResahNotification::QUOTE_REQUEST, $order));