Преглед изворни кода

Supply-orders and shipments (wip)

Vijayakrishnan пре 4 година
родитељ
комит
a079d42458
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      app/Models/Client.php

+ 2 - 0
app/Models/Client.php

@@ -400,12 +400,14 @@ class Client extends Model
     public function supplyOrders()
     {
         return $this->hasMany(SupplyOrder::class, 'client_id', 'id')
+            ->where('is_cancelled', false)
             ->orderBy('created_at', 'desc');
     }
 
     public function unshippedSupplyOrders()
     {
         return $this->hasMany(SupplyOrder::class, 'client_id', 'id')
+            ->where('is_cancelled', false)
             ->whereNull('shipment_id')
             ->orderBy('created_at', 'desc');
     }