Selaa lähdekoodia

Correct cost miscalculation

tags/v0.1.0
Immanuel Onyeka 3 vuotta sitten
vanhempi
commit
be98df5ea4
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. +2
    -2
      app/Console/Commands/ServicesInit.php
  2. +1
    -1
      app/Http/Controllers/OrderController.php

+ 2
- 2
app/Console/Commands/ServicesInit.php Näytä tiedosto

@@ -78,8 +78,8 @@ class ServicesInit extends Command
$s->site = 'youtube';
$s->supplier = 'smmkings';
$s->modifier = 'location';
$s->maximum = 1000;
$s->minimum = 100000;
$s->maximum = 100000;
$s->minimum = 1000;
$s->price = 650;
$s->note = '{locations: {
india: 2600, brazil: 2597, colombia: 2608, philippines: 2609, mexico:


+ 1
- 1
app/Http/Controllers/OrderController.php Näytä tiedosto

@@ -26,7 +26,7 @@ class OrderController extends Controller
abort(422);
}

$cost = ceil($order->quantity*$order->service->price/100000);
$cost = ceil($order->quantity*$order->service->price/1000);
$user->credits = $user->credits - $cost;
if ($cost > $user->credits) {
abort(520, 'Insufficient Credits');


Loading…
Peruuta
Tallenna