mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:37:33 -05:00 
			
		
		
		
	Add transaction filters for payments and expenses
This commit is contained in:
		
							parent
							
								
									70db8052c0
								
							
						
					
					
						commit
						ecb4ee7b8f
					
				@ -92,6 +92,20 @@ class ExpenseFilters extends QueryFilters
 | 
				
			|||||||
        return $this->builder;
 | 
					        return $this->builder;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Returns a list of expenses that can be matched to bank transactions
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function match_transactions($value = '')
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if($value == 'true')
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return $this->builder->where('is_deleted',0)->whereNull('transaction_id');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return $this->builder;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Filters the list based on the status
 | 
					     * Filters the list based on the status
 | 
				
			||||||
 | 
				
			|||||||
@ -81,6 +81,20 @@ class PaymentFilters extends QueryFilters
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Returns a list of payments that can be matched to bank transactions
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function match_transactions($value = '')
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if($value == 'true')
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return $this->builder->where('is_deleted',0)->whereNull('transaction_id');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return $this->builder;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Sorts the list based on $sort.
 | 
					     * Sorts the list based on $sort.
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user