mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 10:47:00 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			36 lines
		
	
	
		
			579 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			579 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| 
 | |
| namespace FireflyIII\Helpers\Csv\PostProcessing;
 | |
| 
 | |
| /**
 | |
|  * Class Amount
 | |
|  *
 | |
|  * @package FireflyIII\Helpers\Csv\PostProcessing
 | |
|  */
 | |
| class Amount implements PostProcessorInterface
 | |
| {
 | |
| 
 | |
|     /** @var  array */
 | |
|     protected $data;
 | |
| 
 | |
|     /**
 | |
|      * @return array
 | |
|      */
 | |
|     public function process()
 | |
|     {
 | |
|         bcscale(2);
 | |
|         $this->data['amount'] = bcmul($this->data['amount'], $this->data['amount-modifier']);
 | |
| 
 | |
|         return $this->data;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * @param array $data
 | |
|      */
 | |
|     public function setData(array $data)
 | |
|     {
 | |
|         $this->data = $data;
 | |
|     }
 | |
| }
 |