<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class OracleDOCWaveDetails extends Model
{
    protected $connection='oracle';
    protected $table='DOC_WAVE_DETAILS';


    static public function unpackedOrders($batchNumber){
        return OracleDOCWaveDetails::where('doc_wave_details.waveno', $batchNumber)->leftJoin('doc_order_header','doc_order_header.orderno','doc_wave_details.orderno')->where(function ($query){
            $query->where('doc_order_header.SOSTATUS','<>','99')->where('doc_order_header.SOSTATUS','<>','63');
        })->get();
    }
}
