mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 14:27:29 -04:00 
			
		
		
		
	Minor fixes
This commit is contained in:
		
							parent
							
								
									584c83e8a6
								
							
						
					
					
						commit
						05593f0824
					
				| @ -200,14 +200,16 @@ class InvoiceFilters extends QueryFilters | |||||||
|      */ |      */ | ||||||
|     public function payable(string $client_id = ''): Builder |     public function payable(string $client_id = ''): Builder | ||||||
|     { |     { | ||||||
|  | 
 | ||||||
|         if (strlen($client_id) == 0) { |         if (strlen($client_id) == 0) { | ||||||
|             return $this->builder; |             return $this->builder; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         return $this->builder->whereIn('status_id', [Invoice::STATUS_DRAFT, Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL]) |         return $this->builder | ||||||
|                              ->where('balance', '>', 0) |                     ->where('client_id', $this->decodePrimaryKey($client_id)) | ||||||
|                              ->where('is_deleted', 0) |                     ->whereIn('status_id', [Invoice::STATUS_DRAFT, Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL]) | ||||||
|                              ->where('client_id', $this->decodePrimaryKey($client_id)); |                     ->where('is_deleted', 0) | ||||||
|  |                     ->where('balance', '>', 0); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -57,8 +57,6 @@ class RefundPaymentRequest extends Request | |||||||
| 
 | 
 | ||||||
|         if (isset($input['credits'])) { |         if (isset($input['credits'])) { | ||||||
|             unset($input['credits']); |             unset($input['credits']); | ||||||
|             // foreach($input['credits'] as $key => $credit)
 |  | ||||||
|             //     $input['credits'][$key]['credit_id'] = $this->decodePrimaryKey($credit['credit_id']);
 |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         $this->replace($input); |         $this->replace($input); | ||||||
|  | |||||||
| @ -12,6 +12,7 @@ | |||||||
| namespace App\Models; | namespace App\Models; | ||||||
| 
 | 
 | ||||||
| use App\Utils\Traits\MakesHash; | use App\Utils\Traits\MakesHash; | ||||||
|  | use Carbon\CarbonInterval; | ||||||
| use Illuminate\Database\Eloquent\SoftDeletes; | use Illuminate\Database\Eloquent\SoftDeletes; | ||||||
| use Illuminate\Support\Carbon; | use Illuminate\Support\Carbon; | ||||||
| 
 | 
 | ||||||
| @ -248,6 +249,7 @@ class Task extends BaseModel | |||||||
|             $duration += max($end_time - $start_time, 0); |             $duration += max($end_time - $start_time, 0); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         // return CarbonInterval::seconds(round($duration))->locale($this->company->locale())->cascade()->forHumans();
 | ||||||
|         return round($duration); |         return round($duration); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user