Transfer Show page file updates..
This commit is contained in:
		@@ -84,6 +84,15 @@ class CreateTransfer extends Job
 | 
			
		||||
                'expense_transaction_id' => $expense_transaction->id,
 | 
			
		||||
                'income_transaction_id' => $income_transaction->id,
 | 
			
		||||
            ]);
 | 
			
		||||
 | 
			
		||||
            // Upload attachment
 | 
			
		||||
            if ($this->request->file('attachment')) {
 | 
			
		||||
                foreach ($this->request->file('attachment') as $attachment) {
 | 
			
		||||
                    $media = $this->getMedia($attachment, 'transfers');
 | 
			
		||||
 | 
			
		||||
                    $this->transfer->attachMedia($media, 'attachment');
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        return $this->transfer;
 | 
			
		||||
 
 | 
			
		||||
@@ -38,6 +38,19 @@ class UpdateTransfer extends Job
 | 
			
		||||
    public function handle()
 | 
			
		||||
    {
 | 
			
		||||
        \DB::transaction(function () {
 | 
			
		||||
            // Upload attachment
 | 
			
		||||
            if ($this->request->file('attachment')) {
 | 
			
		||||
                $this->deleteMediaModel($this->transfer, 'attachment', $this->request);
 | 
			
		||||
 | 
			
		||||
                foreach ($this->request->file('attachment') as $attachment) {
 | 
			
		||||
                    $media = $this->getMedia($attachment, 'transfers');
 | 
			
		||||
 | 
			
		||||
                    $this->transfer->attachMedia($media, 'attachment');
 | 
			
		||||
                }
 | 
			
		||||
            } elseif (!$this->request->file('attachment') && $this->transfer->attachment) {
 | 
			
		||||
                $this->deleteMediaModel($this->transfer, 'attachment', $this->request);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            $expense_currency_code = $this->getCurrencyCode('from');
 | 
			
		||||
            $income_currency_code = $this->getCurrencyCode('to');
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user