fix payment due date days filter

This commit is contained in:
Omair Saleh
2022-10-30 20:37:02 +08:00
parent 032efcb96b
commit cb862123b5
2 changed files with 1 additions and 2 deletions
@@ -23,7 +23,6 @@ abstract class AbstractListRecord extends AbstractGetRecord
return $this->handler($filters);
} catch (QueryException $exception){
dd($exception);
throw new MalformedRequestException('Unable to fetch the list of records due to unexpected error');
}
@@ -19,7 +19,7 @@ class PackingListOrderedByInvoiceDate implements Filter
*/
public static function apply(Builder $builder, $value)
{
return $builder->join('transactions', function($join){
return $builder->select('packing_lists.*')->join('transactions', function($join){
$join->on('transactions.owner_id', '=', 'packing_lists.id');
$join->where('transactions.owner_type', '=', PackingList::class);
$join->where('transactions.status', '=', ApprovalStatus::APPROVED);