浏览代码

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');
     }