mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Math fixes. Not bugs.
This commit is contained in:
		| @@ -259,12 +259,13 @@ class PiggyBankController extends Controller | ||||
|     public function postRemove(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank) | ||||
|     { | ||||
|         $amount = floatval(Input::get('amount')); | ||||
|         bcscale(2); | ||||
|  | ||||
|         $savedSoFar = $piggyBank->currentRelevantRep()->currentamount; | ||||
|  | ||||
|         if ($amount <= $savedSoFar) { | ||||
|             $repetition = $piggyBank->currentRelevantRep(); | ||||
|             $repetition->currentamount -= $amount; | ||||
|             $repetition                = $piggyBank->currentRelevantRep(); | ||||
|             $repetition->currentamount = bcsub($repetition->currentamount, $amount); | ||||
|             $repetition->save(); | ||||
|  | ||||
|             // create event | ||||
|   | ||||
		Reference in New Issue
	
	Block a user