mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 08:57:34 -04:00 
			
		
		
		
	Merge branch 'v5-develop' of https://github.com/turbo124/invoiceninja into v5-develop
This commit is contained in:
		
						commit
						10b64ffa65
					
				| @ -1 +1 @@ | ||||
| 5.9.4 | ||||
| 5.9.5 | ||||
| @ -265,7 +265,7 @@ class TaskRepository extends BaseRepository | ||||
|         if($interval <= $this->task_round_to_nearest) | ||||
|             return $start_time; | ||||
|          | ||||
|         return $start_time - (int)floor($interval/$this->task_round_to_nearest) * $this->task_round_to_nearest; | ||||
|         return $start_time + (int)floor($interval/$this->task_round_to_nearest) * $this->task_round_to_nearest; | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -17,8 +17,8 @@ return [ | ||||
|     'require_https' => env('REQUIRE_HTTPS', true), | ||||
|     'app_url' => rtrim(env('APP_URL', ''), '/'), | ||||
|     'app_domain' => env('APP_DOMAIN', 'invoicing.co'), | ||||
|     'app_version' => env('APP_VERSION', '5.9.4'), | ||||
|     'app_tag' => env('APP_TAG', '5.9.4'), | ||||
|     'app_version' => env('APP_VERSION', '5.9.5'), | ||||
|     'app_tag' => env('APP_TAG', '5.9.5'), | ||||
|     'minimum_client_version' => '5.0.16', | ||||
|     'terms_version' => '1.0.1', | ||||
|     'api_secret' => env('API_SECRET', false), | ||||
|  | ||||
							
								
								
									
										4
									
								
								public/flutter_service_worker.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								public/flutter_service_worker.js
									
									
									
									
										vendored
									
									
								
							| @ -19,8 +19,8 @@ const RESOURCES = {"canvaskit/skwasm.worker.js": "bfb704a6c714a75da9ef320991e88b | ||||
| "favicon.png": "dca91c54388f52eded692718d5a98b8b", | ||||
| "version.json": "1592dbbd49cf08963e29ab3a85640d96", | ||||
| "favicon.ico": "51636d3a390451561744c42188ccd628", | ||||
| "/": "acc1cbe71191357e326b4c27b207aeeb", | ||||
| "main.dart.js": "59212a1c026258cab60381abfd8e607b", | ||||
| "/": "0fda4c8611b35f2313d99bd3a4940422", | ||||
| "main.dart.js": "4ffa4ba4c919730db91f2a5cb9b92add", | ||||
| "assets/AssetManifest.json": "759f9ef9973f7e26c2a51450b55bb9fa", | ||||
| "assets/packages/intl_phone_field/assets/flags/mn.png": "16086e8d89c9067d29fd0f2ea7021a45", | ||||
| "assets/packages/intl_phone_field/assets/flags/vi.png": "3f317c56f31971b3179abd4e03847036", | ||||
|  | ||||
							
								
								
									
										174115
									
								
								public/main.dart.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										174115
									
								
								public/main.dart.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										169791
									
								
								public/main.foss.dart.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										169791
									
								
								public/main.foss.dart.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										13721
									
								
								public/main.profile.dart.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13721
									
								
								public/main.profile.dart.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -50,6 +50,20 @@ class TaskRoundingTest extends TestCase | ||||
|         Model::reguard(); | ||||
|     } | ||||
| 
 | ||||
|     public function testRoundDownToMinute() | ||||
|     { | ||||
|         $start_time = 1718071646; | ||||
|         $end_time = 1718078906; | ||||
|         $this->task_round_to_nearest = 60; | ||||
|         $this->task_round_up = false; | ||||
| 
 | ||||
|         $rounded = $start_time + 7260; | ||||
| 
 | ||||
|         $this->assertEquals($rounded, $end_time); | ||||
|         $this->assertEquals($rounded, $this->roundTimeLog($start_time, $end_time)); | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     public function testRoundUp() | ||||
|     { | ||||
|         $start_time = 1714942800; | ||||
| @ -66,8 +80,6 @@ class TaskRoundingTest extends TestCase | ||||
|     public function testRoundUp2() | ||||
|     { | ||||
|          | ||||
| 
 | ||||
| 
 | ||||
|         $start_time = 1715237056; | ||||
|         $end_time = $start_time + 60*7;  | ||||
|         $this->task_round_to_nearest = 600; | ||||
| @ -194,9 +206,23 @@ $this->assertEquals($rounded, $this->roundTimeLog($start_time, $end_time)); | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     // public function roundTimeLog(int $start_time, int $end_time): int
 | ||||
|     // {
 | ||||
|     //     if($this->task_round_to_nearest == 1)
 | ||||
|     //         return $end_time;
 | ||||
| 
 | ||||
|     //     $interval = $end_time - $start_time;
 | ||||
| 
 | ||||
|     //     if($this->task_round_up)
 | ||||
|     //         return $start_time + (int)ceil($interval/$this->task_round_to_nearest)*$this->task_round_to_nearest;
 | ||||
| 
 | ||||
|     //     return $start_time - (int)floor($interval/$this->task_round_to_nearest) * $this->task_round_to_nearest;
 | ||||
| 
 | ||||
|     // }
 | ||||
| 
 | ||||
|     public function roundTimeLog(int $start_time, int $end_time): int | ||||
|     { | ||||
|         if($this->task_round_to_nearest == 1) | ||||
|         if($this->task_round_to_nearest == 1 || $end_time == 0) | ||||
|             return $end_time; | ||||
| 
 | ||||
|         $interval = $end_time - $start_time; | ||||
| @ -204,8 +230,12 @@ $this->assertEquals($rounded, $this->roundTimeLog($start_time, $end_time)); | ||||
|         if($this->task_round_up) | ||||
|             return $start_time + (int)ceil($interval/$this->task_round_to_nearest)*$this->task_round_to_nearest; | ||||
| 
 | ||||
|         return $start_time - (int)floor($interval/$this->task_round_to_nearest) * $this->task_round_to_nearest; | ||||
|         if($interval <= $this->task_round_to_nearest) | ||||
|             return $start_time; | ||||
|          | ||||
|         return $start_time + (int)floor($interval/$this->task_round_to_nearest) * $this->task_round_to_nearest; | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user