Browse Source

Supply-orders and shipments (wip)

Vijayakrishnan 4 years ago
parent
commit
a079d42458
1 changed files with 2 additions and 0 deletions
  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');
     }