Skip to content

Commit

Permalink
v6.0.5
Browse files Browse the repository at this point in the history
fix regression in Base Currency setting and currency conversion.
update dependencies
  • Loading branch information
dave_albright committed Dec 9, 2022
1 parent 62eac84 commit e3380a0
Show file tree
Hide file tree
Showing 258 changed files with 3,637 additions and 1,928 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 6.0.5
- fix regression in Base Currency setting and currency conversion

## 6.0.4
- fix regression in datatable search returnurl
- add red/bold to overdue invoice due_at in datatable
Expand Down
2 changes: 1 addition & 1 deletion app/Modules/ClientCenter/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

Route::middleware('web')
->prefix('client_center')->name('clientCenter.')->group(function () {
Route::get('/', 'ClientCenterDashboardController@redirectToLogin');
Route::get('/', [ClientCenterDashboardController::class, 'redirectToLogin']);
Route::name('public.invoice.show')->get('invoice/{invoiceKey}', [ClientCenterPublicInvoiceController::class, 'show']);
Route::name('public.invoice.pdf')->get('invoice/{invoiceKey}/pdf', [ClientCenterPublicInvoiceController::class, 'pdf']);
Route::name('public.invoice.html')->get('invoice/{invoiceKey}/html', [ClientCenterPublicInvoiceController::class, 'html']);
Expand Down
3 changes: 2 additions & 1 deletion app/Modules/Currencies/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use BT\Modules\Currencies\Controllers\CurrencyController;

Route::name('currencies.getExchangeRate')->post('currencies/get-exchange-rate', [CurrencyController::class, 'getExchangeRate']);
Route::middleware(['web', 'auth.admin'])
->prefix('currencies')->name('currencies.')->group(function () {
Route::name('index')->get('/', [CurrencyController::class, 'index']);
Expand All @@ -19,5 +20,5 @@
Route::name('edit')->get('{id}/edit', [CurrencyController::class, 'edit']);
Route::name('update')->post('{id}', [CurrencyController::class, 'update']);
Route::name('delete')->get('{id}/delete', [CurrencyController::class, 'delete']);
Route::name('getExchangeRate')->post('get-exchange-rate', [CurrencyController::class, 'getExchangeRate']);
// Route::name('getExchangeRate')->post('get-exchange-rate', [CurrencyController::class, 'getExchangeRate']);
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Release Notes
---
### BillingTrack 6.0.5 (2022-12-09)
- fix regression in Base Currency setting and currency conversion

### BillingTrack 6.0.4 (2022-10-14)
- fix regression in datatable search returnurl
- add red/bold to overdue invoice due_at in datatable
Expand Down
2 changes: 1 addition & 1 deletion app/Observers/InvoiceObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function creating(Invoice $invoice): void
$invoice->exchange_rate = 1;
} elseif (!$invoice->exchange_rate) {
$currencyConverter = CurrencyConverterFactory::create();
$invoice->exchange_rate = $currencyConverter->convert(config('bt.baseCurrency'), $invoice->currency_code);
$invoice->exchange_rate = $currencyConverter->convert(config('bt.currencyConversionKey'), config('bt.baseCurrency'), $invoice->currency_code);
}

$invoice->url_key = str_random(32);
Expand Down
2 changes: 1 addition & 1 deletion app/Observers/PurchaseorderObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function creating(Purchaseorder $purchaseorder): void
elseif (!$purchaseorder->exchange_rate)
{
$currencyConverter = CurrencyConverterFactory::create();
$purchaseorder->exchange_rate = $currencyConverter->convert(config('bt.baseCurrency'), $purchaseorder->currency_code);
$purchaseorder->exchange_rate = $currencyConverter->convert(config('bt.currencyConversionKey'), config('bt.baseCurrency'), $purchaseorder->currency_code);
}

$purchaseorder->url_key = str_random(32);
Expand Down
2 changes: 1 addition & 1 deletion app/Observers/QuoteObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function creating(Quote $quote): void
elseif (!$quote->exchange_rate)
{
$currencyConverter = CurrencyConverterFactory::create();
$quote->exchange_rate = $currencyConverter->convert(config('bt.baseCurrency'), $quote->currency_code);
$quote->exchange_rate = $currencyConverter->convert(config('bt.currencyConversionKey'), config('bt.baseCurrency'), $quote->currency_code);
}

$quote->url_key = str_random(32);
Expand Down
2 changes: 1 addition & 1 deletion app/Observers/RecurringInvoiceObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function creating(RecurringInvoice $recurringInvoice): void
elseif (!$recurringInvoice->exchange_rate)
{
$currencyConverter = CurrencyConverterFactory::create();
$recurringInvoice->exchange_rate = $currencyConverter->convert(config('bt.baseCurrency'), $recurringInvoice->currency_code);
$recurringInvoice->exchange_rate = $currencyConverter->convert(config('bt.currencyConversionKey'), config('bt.baseCurrency'), $recurringInvoice->currency_code);
}

}
Expand Down
2 changes: 1 addition & 1 deletion app/Observers/WorkorderObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function creating(Workorder $workorder): void
$workorder->exchange_rate = 1;
} elseif (!$workorder->exchange_rate) {
$currencyConverter = CurrencyConverterFactory::create();
$workorder->exchange_rate = $currencyConverter->convert(config('bt.baseCurrency'), $workorder->currency_code);
$workorder->exchange_rate = $currencyConverter->convert(config('bt.currencyConversionKey'), config('bt.baseCurrency'), $workorder->currency_code);
}

$workorder->url_key = str_random(32);
Expand Down
Loading

0 comments on commit e3380a0

Please sign in to comment.