mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 18:54:58 +00:00 
			
		
		
		
	Some more last-minute fixes.
This commit is contained in:
		| @@ -177,7 +177,12 @@ class TransactionFactory | |||||||
|         } |         } | ||||||
|         // @codeCoverageIgnoreEnd |         // @codeCoverageIgnoreEnd | ||||||
|         if (null !== $result) { |         if (null !== $result) { | ||||||
|             Log::debug(sprintf('Created transaction #%d (%s %s), part of journal #%d', $result->id, $this->currency->code, $amount, $this->journal->id)); |             Log::debug( | ||||||
|  |                 sprintf( | ||||||
|  |                     'Created transaction #%d (%s %s, account %s), part of journal #%d', $result->id, $this->currency->code, $amount, $this->account->name, | ||||||
|  |                     $this->journal->id | ||||||
|  |                 ) | ||||||
|  |             ); | ||||||
|  |  | ||||||
|             // do foreign currency thing: add foreign currency info to $one and $two if necessary. |             // do foreign currency thing: add foreign currency info to $one and $two if necessary. | ||||||
|             if (null !== $this->foreignCurrency && null !== $foreignAmount && $this->foreignCurrency->id !== $this->currency->id) { |             if (null !== $this->foreignCurrency && null !== $foreignAmount && $this->foreignCurrency->id !== $this->currency->id) { | ||||||
|   | |||||||
| @@ -287,7 +287,7 @@ class TransactionJournalFactory | |||||||
|             $destForeignCurrency   = $foreignCurrency; |             $destForeignCurrency   = $foreignCurrency; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         if ('Transfer' === $type->type) { |         if (TransactionType::TRANSFER === $type->type) { | ||||||
|             // get currencies |             // get currencies | ||||||
|             $currency        = $this->getCurrency($currency, $sourceAccount); |             $currency        = $this->getCurrency($currency, $sourceAccount); | ||||||
|             $foreignCurrency = $this->getCurrency($foreignCurrency, $destinationAccount); |             $foreignCurrency = $this->getCurrency($foreignCurrency, $destinationAccount); | ||||||
| @@ -298,6 +298,11 @@ class TransactionJournalFactory | |||||||
|             $destForeignCurrency   = $currency; |             $destForeignCurrency   = $currency; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         // if transfer, switch accounts: | ||||||
|  |         if (TransactionType::TRANSFER === $type->type) { | ||||||
|  |             [$sourceAccount, $destinationAccount] = [$destinationAccount, $sourceAccount]; | ||||||
|  |         } | ||||||
|  |  | ||||||
|         /** Create a basic journal. */ |         /** Create a basic journal. */ | ||||||
|         $journal = TransactionJournal::create( |         $journal = TransactionJournal::create( | ||||||
|             [ |             [ | ||||||
|   | |||||||
| @@ -73,7 +73,6 @@ class ShowController extends Controller | |||||||
|         $type     = $first->transactionType->type; |         $type     = $first->transactionType->type; | ||||||
|         $title    = 1 === $splits ? $first->description : $transactionGroup->title; |         $title    = 1 === $splits ? $first->description : $transactionGroup->title; | ||||||
|         $subTitle = sprintf('%s: "%s"', $type, $title); |         $subTitle = sprintf('%s: "%s"', $type, $title); | ||||||
|         $message  = $request->get('message'); |  | ||||||
|  |  | ||||||
|         /** @var TransactionGroupTransformer $transformer */ |         /** @var TransactionGroupTransformer $transformer */ | ||||||
|         $transformer = app(TransactionGroupTransformer::class); |         $transformer = app(TransactionGroupTransformer::class); | ||||||
| @@ -91,7 +90,7 @@ class ShowController extends Controller | |||||||
|         return view( |         return view( | ||||||
|             'transactions.show', compact( |             'transactions.show', compact( | ||||||
|                                    'transactionGroup', 'amounts', 'first', 'type', 'subTitle', 'splits', 'groupArray', |                                    'transactionGroup', 'amounts', 'first', 'type', 'subTitle', 'splits', 'groupArray', | ||||||
|                                    'events', 'attachments', 'links', 'message' |                                    'events', 'attachments', 'links' | ||||||
|                                ) |                                ) | ||||||
|         ); |         ); | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -459,8 +459,9 @@ class ImportArrayStorage | |||||||
|  |  | ||||||
|             // compare date: |             // compare date: | ||||||
|             $transferDate = $transfer['date']->format('Y-m-d H:i:s'); |             $transferDate = $transfer['date']->format('Y-m-d H:i:s'); | ||||||
|             Log::debug(sprintf('Comparing dates "%s" to "%s"', $transaction['date'], $transferDate)); |             $transactionDate = $transaction['date']->format('Y-m-d H:i:s'); | ||||||
|             if ($transaction['date'] !== $transferDate) { |             Log::debug(sprintf('Comparing dates "%s" to "%s"', $transactionDate, $transferDate)); | ||||||
|  |             if ($transactionDate !== $transferDate) { | ||||||
|                 Log::debug('Date is not a match, continue with next transfer.'); |                 Log::debug('Date is not a match, continue with next transfer.'); | ||||||
|                 continue; // @codeCoverageIgnore |                 continue; // @codeCoverageIgnore | ||||||
|             } |             } | ||||||
|   | |||||||
| @@ -120,7 +120,6 @@ class ImportableConverter | |||||||
|  |  | ||||||
|         // amount is positive? Then switch: |         // amount is positive? Then switch: | ||||||
|         if (1 === bccomp($amount, '0')) { |         if (1 === bccomp($amount, '0')) { | ||||||
|  |  | ||||||
|             [$destination, $source] = [$source, $destination]; |             [$destination, $source] = [$source, $destination]; | ||||||
|             Log::debug( |             Log::debug( | ||||||
|                 sprintf( |                 sprintf( | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ | |||||||
|     {% if periods|length > 0 %} |     {% if periods|length > 0 %} | ||||||
|         <div class="row"> |         <div class="row"> | ||||||
|             <div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12"> |             <div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12"> | ||||||
|                 <p class="small text-center"><a href="{{ route('transactions.index.all',[transactionType]) }}">{{ 'showEverything'|_ }}</a></p> |                 <p class="small text-center"><a href="{{ route('transactions.index.all',[objectType]) }}">{{ 'showEverything'|_ }}</a></p> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     {% endif %} |     {% endif %} | ||||||
| @@ -34,12 +34,12 @@ | |||||||
|                     {% if periods|length > 0 %} |                     {% if periods|length > 0 %} | ||||||
|                         <p> |                         <p> | ||||||
|                             <i class="fa fa-calendar"></i> |                             <i class="fa fa-calendar"></i> | ||||||
|                             <a href="{{ route('transactions.index.all', [transactionType]) }}">{{ 'show_all_no_filter'|_ }}</a> |                             <a href="{{ route('transactions.index.all', [objectType]) }}">{{ 'show_all_no_filter'|_ }}</a> | ||||||
|                         </p> |                         </p> | ||||||
|                     {% else %} |                     {% else %} | ||||||
|                         <p> |                         <p> | ||||||
|                             <i class="fa fa-calendar"></i> |                             <i class="fa fa-calendar"></i> | ||||||
|                             <a href="{{ route('transactions.index', [transactionType]) }}">{{ 'show_the_current_period_and_overview'|_ }}</a> |                             <a href="{{ route('transactions.index', [objectType]) }}">{{ 'show_the_current_period_and_overview'|_ }}</a> | ||||||
|                         </p> |                         </p> | ||||||
|                     {% endif %} |                     {% endif %} | ||||||
|                 </div> |                 </div> | ||||||
| @@ -59,7 +59,7 @@ | |||||||
|     {% if periods|length > 0 %} |     {% if periods|length > 0 %} | ||||||
|         <div class="row"> |         <div class="row"> | ||||||
|             <div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12"> |             <div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12"> | ||||||
|                 <p class="small text-center"><a href="{{ route('transactions.index.all',[transactionType]) }}">{{ 'showEverything'|_ }}</a></p> |                 <p class="small text-center"><a href="{{ route('transactions.index.all', [objectType]) }}">{{ 'showEverything'|_ }}</a></p> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     {% endif %} |     {% endif %} | ||||||
|   | |||||||
| @@ -5,36 +5,6 @@ | |||||||
| {% endblock %} | {% endblock %} | ||||||
|  |  | ||||||
| {% block content %} | {% block content %} | ||||||
|     {% if message == 'created' %} |  | ||||||
|         <div class="row"> |  | ||||||
|             <div class="col-lg-12"> |  | ||||||
|                 <div class="alert alert-success alert-dismissible" role="alert"> |  | ||||||
|                     <button type="button" class="close" data-dismiss="alert"> |  | ||||||
|                         <span>×</span><span class="sr-only">{{ 'close'|_ }}</span> |  | ||||||
|                     </button> |  | ||||||
|                     <strong>{{ 'flash_success'|_ }}</strong> |  | ||||||
|                     {{ trans('firefly.stored_journal_no_descr') }} |  | ||||||
|  |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
|     {% endif %} |  | ||||||
|  |  | ||||||
|     {% if message == 'updated' %} |  | ||||||
|         <div class="row"> |  | ||||||
|             <div class="col-lg-12"> |  | ||||||
|                 <div class="alert alert-success alert-dismissible" role="alert"> |  | ||||||
|                     <button type="button" class="close" data-dismiss="alert"> |  | ||||||
|                         <span>×</span><span class="sr-only">{{ 'close'|_ }}</span> |  | ||||||
|                     </button> |  | ||||||
|                     <strong>{{ 'flash_success'|_ }}</strong> |  | ||||||
|                     {{ trans('firefly.updated_journal_no_descr') }} |  | ||||||
|  |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
|     {% endif %} |  | ||||||
|  |  | ||||||
|     <div class="row"> |     <div class="row"> | ||||||
|         <div class="col-lg-6"> |         <div class="col-lg-6"> | ||||||
|             <div class="box box-primary"> |             <div class="box box-primary"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user